tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: definition of NULL correct?



On Wed, Aug 12, 2009 at 12:38:53AM -0400, der Mouse wrote:
 > I don't see why.  Plenty of expressions - mostly involving casts -
 > become syntax errors when you tack a "sizeof" on in front of them.  I
 > don't see anything prohibiting "NULL" from being another.

The principle of least surprise suggests that NULL should not expand
to something that syntactically functions differently from a single
identifier token.

But that's not part of the standard, yes. :-)

 > (especially since I believe NULL should never be used)

Should I ask why or is that borrowing trouble?

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index