@cindex keywords, alternate
@option{-ansi} and the various @option{-std} options disable certain
-keywords. This causes trouble when you want to use GNU C extensions, or
-a general-purpose header file that should be usable by all programs,
-including ISO C programs. The keywords @code{asm}, @code{typeof} and
+keywords that are GNU C extensions.
+Specifically, the keywords @code{asm}, @code{typeof} and
@code{inline} are not available in programs compiled with
-@option{-ansi} or @option{-std} (although @code{inline} can be used in a
-program compiled with @option{-std=c99} or a later standard). The
-ISO C99 keyword
-@code{restrict} is only available when @option{-std=gnu99} (which will
-eventually be the default) or @option{-std=c99} (or the equivalent
-@option{-std=iso9899:1999}), or an option for a later standard
-version, is used.
+@option{-ansi} or a @option{-std=} option specifying an ISO standard that
+doesn't define the keyword. This causes trouble when you want to use
+these extensions in a header file that can be included in programs that may
+be compiled with with such options.
The way to solve these problems is to put @samp{__} at the beginning and
end of each problematical keyword. For example, use @code{__asm__}
In C mode, this is equivalent to @option{-std=c90}. In C++ mode, it is
equivalent to @option{-std=c++98}.
-This turns off certain features of GCC that are incompatible with ISO
-C90 (when compiling C code), or of standard C++ (when compiling C++ code),
-such as the @code{asm} and @code{typeof} keywords, and
-predefined macros such as @code{unix} and @code{vax} that identify the
-type of system you are using. It also enables the undesirable and
-rarely used ISO trigraph feature. For the C compiler,
-it disables recognition of C++ style @samp{//} comments as well as
-the @code{inline} keyword.
-
-The alternate keywords @code{__asm__}, @code{__extension__},
-@code{__inline__} and @code{__typeof__} continue to work despite
-@option{-ansi}. You would not want to use them in an ISO C program, of
-course, but it is useful to put them in header files that might be included
-in compilations done with @option{-ansi}. Alternate predefined macros
-such as @code{__unix__} and @code{__vax__} are also available, with or
-without @option{-ansi}.
-
-The @option{-ansi} option does not cause non-ISO programs to be
-rejected gratuitously. For that, @option{-Wpedantic} is required in
-addition to @option{-ansi}. @xref{Warning Options}.
-
-The macro @code{__STRICT_ANSI__} is predefined when the @option{-ansi}
-option is used. Some header files may notice this macro and refrain
-from declaring certain functions or defining certain macros that the
-ISO standard doesn't call for; this is to avoid interfering with any
-programs that might use these names for other things.
-
-Functions that are normally built in but do not have semantics
-defined by ISO C (such as @code{alloca} and @code{ffs}) are not built-in
-functions when @option{-ansi} is used. @xref{Other Builtins,,Other
-built-in functions provided by GCC}, for details of the functions
-affected.
-
@opindex std
@item -std=
Determine the language standard. @xref{Standards,,Language Standards