http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55783

--- Comment #6 from David Sankel <david at stellarscience dot com> 2012-12-22 
00:33:44 UTC ---
I suppose which gnu extensions are, by default, enabled in the -std=c++11 mode
is up for debate (one which I have no interest in). However, this program still
compiles with "-pedantic".

"-pedantic
   Issue all the warnings demanded by strict ISO C and ISO C++; reject all
   programs that use forbidden extensions"

Allowing for these narrowing conversions would qualify as a forbidden
extension.

Regarding compliance, I think Johnathan's snippet is misleading. Here is the
relevant surrounding text:

  If a program contains a violation of any diagnosable rule or an occurrence of
a construct described in
  this Standard as “conditionally-supported” when the implementation does not
support that construct,
  a conforming implementation shall issue at least one diagnostic message.

I didn't see in the standard where it states that breaking this feature is
"conditionally supported".

However, it does say:

  If a program contains a violation of a rule for which no diagnostic is
required, this International
  Standard places no requirement on implementations with respect to that
program.

Which pretty much allows gcc to do anything it wants with malformed programs.
But as stated above, -pedantic should guarentee rejection.

Reply via email to