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

--- Comment #26 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-26 
01:53:59 UTC ---
> (In reply to comment #24)
> > So, in g++ parlance, "b" and "d" is a pedwarn enabled by default, while "c" 
> > is
> > a pedwarn in c++98 mode enabled by -Wpedantic and nothing in c++11 mode.
> 
> Which makes sense, because "c" is not valid C++98 but is valid C++11
> 
> I think referring to what's actually valid according to the standard is 
> useful,
> rather than inferring it from what other compilers do.
> 
> My suggestion would be do nothing and lose the PR.  If you want a warning in
> C++98 use -pedantic, which is consistent with other GNU extensions. In C++11
> use constexpr.

But -pedantic is creating an error, which is not what one would expect.

Moreover, it is creating an error for something that is accepted without
-pedantic and accepted by C++11, and has well-defined semantics, so it could be
perfectly accepted as a GNU extension (which is what clang does).

Anyway, I am not going to work on this, and I guess we scared Paolo, so someone
else would have to fix the above, if they care. But it is definitely a bug.

Reply via email to