This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]