Tue Mar 14 14:57:00 GMT 2006
On Linux, <features.h> states that #define _GNU_SOURCE implies
_ISOC99_SOURCE. Code that includes:
for (int i=0; ...)
compiles fine with
gcc -std=c99 ...
but does not compile without the explicit -std flag, instead generating
the error: 'for' loop initial declaration used outside C99 mode
I had hoped that #define _GNU_SOURCE would allow compilation without the
-std flag. Is there a way to structure the code so that the -std flag
is not necessary?
More information about the Gcc-help