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

--- Comment #4 from Will Hawkins <whh8b at virginia dot edu> ---
(In reply to jos...@codesourcery.com from comment #3)
> 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.

Thank you for patiently pointing that out to me. I would not have noticed the
subtlety had you not mentioned it explicitly. I am sorry for being so dense. I
hope that I didn't waste anyone's time. I am going to close this now. 

Thanks again!
Will

Reply via email to