standards/50889: NULL defined as 0 instead of (void *)0
Jens Schweikhardt
schweikh at FreeBSD.org
Wed Apr 16 05:49:57 PDT 2003
Synopsis: NULL defined as 0 instead of (void *)0
State-Changed-From-To: open->analyzed
State-Changed-By: schweikh
State-Changed-When: Wed Apr 16 05:38:52 PDT 2003
State-Changed-Why:
The bug is in your code. Because ISO 9899 explicitly allows NULL to be
defined as 0 (C99 6.3.2.3), any code must take this possibility into
account. If expansion to 0 leads to different semantics than expansion
to (void*)0 then the code must use a cast.
I agree, though, that it may be desirable to
#define NULL ((void*)0)
http://www.freebsd.org/cgi/query-pr.cgi?pr=50889
More information about the freebsd-standards
mailing list