------- 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

Reply via email to