https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85361

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
See the documentation of -std=, regarding base standards.

# The compiler can accept several base standards, such as @samp{c90} or
# @samp{c++98}, and GNU dialects of those standards, such as
# @samp{gnu90} or @samp{gnu++98}.  When a base standard is specified, the
# compiler accepts all programs following that standard plus those
# using GNU extensions that do not contradict it.  For example,
# @option{-std=c90} 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, when a GNU dialect of a standard is
# specified, all features supported by the compiler are enabled, even when
# those features change the meaning of the base standard.  As a result, some
# strict-conforming programs may be rejected.  The particular standard
# is used by @option{-Wpedantic} to identify which features are GNU
# extensions given that version of the standard. For example
# @option{-std=gnu90 -Wpedantic} warns about C++ style @samp{//}
# comments, while @option{-std=gnu99 -Wpedantic} does not.

Reply via email to