[Bug c++/35669] NULL (__null) not considered different from 0 with C++
manu at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Mar 23 19:44:00 GMT 2008
------- Comment #5 from manu at gcc dot gnu dot org 2008-03-23 19:43 -------
(In reply to comment #4)
>
> > Otherwise, whether this is
> > worth warning or a nuisance is a matter of opinion.
>
> True. So, is there any example where use of NULL / __null in a non-pointer
> context is a good idea?
Is there an example where it leads to bugs? I don't know why C++ doesn't follow
C here, but there must be some reason, no?
On the other hand, it seems we *do* warn about it with -Wconversion. So, where
do you want to move it? Check the list of GCC warnings:
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
I think this isn't worth discussing anymore, it just needs someone to be
bothered enough by it to write a patch+testcases, bootstrap, run the regression
testsuite and submit to gcc-patches.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35669
More information about the Gcc-bugs
mailing list