[Bug c++/31755] Clarify NULL pointer conversion to other types in initialiser
manu at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Feb 14 20:04:00 GMT 2010
------- Comment #3 from manu at gcc dot gnu dot org 2010-02-14 20:04 -------
(In reply to comment #2)
> In C++ NULL is defined as 0, or 0L. However, as it is a special keyword, I
> would like g++ to identify that it is special, and warn when initialising non
> pointer types to be NULL.
This is on purpose. See PR c++/24745.
> Ah ok, so it does this already, with the -Wconversion.. I had expected that
> would be in -Wall! Can it be added to -Wall?
No, it can't. Wconversion is too noisy at the moment and it warns for perfectly
legitimate code that is difficult to change. I think it is to imprecise even
for -Wextra.
http://gcc.gnu.org/wiki/NewWconversion
Since there is another bug for the other issues you mention, I am closing this
one as INVALID.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31755
More information about the Gcc-bugs
mailing list