This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33750] initialization of non-integral member constant not rejected
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Oct 2007 14:27:35 -0000
- Subject: [Bug c++/33750] initialization of non-integral member constant not rejected
- References: <bug-33750-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from manu at gcc dot gnu dot org 2007-10-12 14:27 -------
(In reply to comment #0)
> why do we guard the pedwarn with if (pedantic)??
>
-pedantic
Issue all the warnings demanded by strict ISO C and ISO C++ (...)
Valid ISO C and ISO C++ programs should compile properly with or
without this option (...). However, without
this option, certain GNU extensions and traditional C and C++
fea‐
tures are supported as well. With this option, they are rejected.
So I guess that the program compiles and does what it is intended (thus we
don't warn by default) but ISO C++ requires a warning, thus -pedantic gives the
warning.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33750