This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/35669] NULL (__null) not considered different from 0 with C++



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]