cpp problem using 20021202 snapshot

Schirmer, Hartmut HSchirmer@Innovative-Systems.de
Wed Dec 4 02:19:00 GMT 2002


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



More information about the Gcc mailing list