On Mon, Aug 31, 2020 at 12:38:57AM +0000, Taylor R Campbell wrote:
> > 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
> % 

Argh, I am trying to come up with examples while juggling these changes
in my actual /usr/include.

Very tempted to just settle for sprinkling #undef's in random projects
instead.

Reply via email to