Supported by GCC}, for details of these standard versions. This option
is currently only supported when compiling C or C++.
+The compiler can accept several base standards, such as @samp{c89} or
+@samp{c++98}, and GNU dialects of those standards, such as
+@samp{gnu89} or @samp{gnu++98}. By specifing a base standard, the
+compiler will accept all programs following that standard and those
+using GNU extensions that do not contradict it. For example,
+@samp{-std=c89} turns off certain features of GCC that are
+incompatible with ISO C90, such as the @code{asm} and @code{typeof}
+keywords, but not other GNU extensions that do not have a meaning in
+ISO C90, such as omitting the middle term of a @code{?:}
+expression. On the other hand, by specifing a GNU dialect of a
+standard, all features the compiler support are enabled, even when
+those features change the meaning of the base standard and some
+strict-conforming programs may be rejected. The particular standard
+is used by @option{-pedantic} to identify which features are GNU
+extensions given that version of the standard. For example
+@samp{-std=gnu89 -pedantic} would warn about C++ style @samp{//}
+comments, while @samp{-std=gnu99 -pedantic} would not.
+
A value for this option must be provided; possible values are
@table @samp
@item c89
@itemx iso9899:1990
-ISO C90 (same as @option{-ansi}).
+Support all ISO C90 programs (certain GNU extensions that conflict
+with ISO C90 are disabled). Same as @option{-ansi} for C code.
@item iso9899:199409
ISO C90 as modified in amendment 1.
names @samp{c9x} and @samp{iso9899:199x} are deprecated.
@item gnu89
-Default, ISO C90 plus GNU extensions (including some C99 features).
+GNU dialect of ISO C90 (including some C99 features). This
+is the default for C code.
@item gnu99
@itemx gnu9x
-ISO C99 plus GNU extensions. When ISO C99 is fully implemented in GCC,
+GNU dialect of ISO C99. When ISO C99 is fully implemented in GCC,
this will become the default. The name @samp{gnu9x} is deprecated.
@item c++98
-The 1998 ISO C++ standard plus amendments.
+The 1998 ISO C++ standard plus amendments. Same as @option{-ansi} for
+C++ code.
@item gnu++98
-The same as @option{-std=c++98} plus GNU extensions. This is the
-default for C++ code.
+GNU dialect of @option{-std=c++98}. This is the default for
+C++ code.
@item c++0x
The working draft of the upcoming ISO C++0x standard. This option
not part of the C++0x standard.
@item gnu++0x
-The same as @option{-std=c++0x} plus GNU extensions. As with
-@option{-std=c++0x}, this option enables experimental features that may
-be removed in future versions of GCC.
+GNU dialect of @option{-std=c++0x}. This option enables
+experimental features that may be removed in future versions of GCC.
@end table
-Even when this option is not specified, you can still use some of the
-features of newer standards in so far as they do not conflict with
-previous C standards. For example, you may use @code{__restrict__} even
-when @option{-std=c99} is not specified.
-
-The @option{-std} options specifying some version of ISO C have the same
-effects as @option{-ansi}, except that features that were not in ISO C90
-but are in the specified version (for example, @samp{//} comments and
-the @code{inline} keyword in ISO C99) are not disabled.
-
@item -fgnu89-inline
@opindex fgnu89-inline
The option @option{-fgnu89-inline} tells GCC to use the traditional