> Date: Mon, 31 Aug 2020 00:25:52 +0000
> From: m...@netbsd.org
> 
> The following script fails to compile, it shouldn't.
> 
> #!/bin/sh
> 
> cat << EOF > test.c
> #include <stdlib.h>
> #include <stdio.h>
>  
> void f1(void)
> {
>     puts("pushed first");
>     fflush(stdout);
> }
>  
> void f2(void)
> {
>     puts("pushed second");
> }
>  
> int main(void)
> {
>     at_quick_exit(f1);
>     at_quick_exit(f2);
>     quick_exit(0);
> }
> EOF
> cc test.c -std=c11 -Werror

Works for me?

% cat << EOF > test.c
...
EOF
% cc test.c -std=c11 -Werror
% ./a.out
pushed second
pushed first
% 

Reply via email to