This is the mail archive of the
mailing list for the GCC project.
Re: PATCH for NULL handling
>>>>> "Jason" == Jason Merrill <firstname.lastname@example.org> writes:
Jason> This subverts the purpose of handling NULL specially in the
Jason> first place: to catch mistakes like this. I would be open
Jason> to changing build_binary_op_nodefault to notice this case
Jason> and accept it with a warning, though.
I misunderstood the purpose of __null; I thought it was largely to
allow better error messages, For example, things like `cannot
dereference the NULL pointer' versus `0 is not a pointer'.
Clearly, code like `i != NULL', where i is an integer, is legal, by
the standard. I agree that it's OK if we issue a warning on such
constructs. I'll attempt to add code for to issue the warning.
Mark Mitchell email@example.com
Mark Mitchell Consulting http://www.markmitchell.com