This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
cpp problem using 20021202 snapshot
- From: "Schirmer, Hartmut" <HSchirmer at Innovative-Systems dot de>
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Wed, 4 Dec 2002 11:18:03 +0100
- Subject: cpp problem using 20021202 snapshot
Hi,
compiling this program
---------------------------
#if 1 // check 1
int foo(int x)
{
return x+x;
}
#endif // check 2
---------------------------
works for
sh-hitachi-coff-gcc -std=c99 -E -o test.i test.c
Adding -ansi make this example fail:
sh-hitachi-coff-gcc -ansi -std=c99 -E -o test.i test.c
test.c:1:8: operator '/' has no right operand
test.c:6:8: warning: extra tokens at end of #endif directive
Looks like -ansi wins over -std=c99
Is this correct ?
Thanks,
Hartmut