-std=c99

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux