gcc中关于C/C++标准的选项

man gcc里面说到gcc使用指定的标准编译C/C++的选项是:-std=standard,其中standard可以是

c89(传说中的c89)
iso9899:1990
    Support all ISO C90 programs (certain GNU extensions that conflict with ISO C90
    are disabled). Same as -ansi for C code.

iso9899:199409
    ISO C90 as modified in amendment 1.

c99(传说中的c99)
c9x
iso9899:1999
iso9899:199x
    ISO C99.  Note that this standard is not yet fully supported; see
    <http://gcc.gnu.org/gcc-4.2/c99status.html> for more information.  The names c9x
    and iso9899:199x are deprecated.

gnu89
    GNU dialect of ISO C90 (including some C99 features). This is the default for C code.

gnu99
gnu9x
    GNU dialect of ISO C99.  When ISO C99 is fully implemented in GCC, this will
    become the default.  The name gnu9x is deprecated.

c++98
    The 1998 ISO C++ standard plus amendments. Same as -ansi for C++ code.

gnu++98
    GNU dialect of -std=c++98.  This is the default for C++ code.

还有一个选项就是-ansi,上面也说到了。

以上是在gcc4.2.4里面看到的。