gcc ANSI ISO C . -std=gnuNN, GNU- . 5 ( ) -std=gnu90. 5, -std=gnu11.
ISO C: C90, C99 C11. (C95 C90.) ANSI C 1989 C89; , ISO C90.
gcc,
info gcc
" ".
, gcc, , info gcc, gcc, , , " " , . gcc -.
,
gcc --version
, , GCC online documentation , .
More simply, if you have a version prior to 5.0, the default is -std=gnu89; otherwise, the default value is -std=gnu11. (This may change in a future version, but only some time after the publication of the new ISO C standard, and the gcc developers managed to implement it and decided to do it by default. Do not hold your breath.)
Or you can completely avoid the issue by specifying the version you need using the command line option -std=....
source
share