Date: Wed, 16 Apr 2003 05:49:55 -0700 (PDT) From: Jens Schweikhardt <schweikh@FreeBSD.org> To: lamer@properfucked.net, schweikh@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: standards/50889: NULL defined as 0 instead of (void *)0 Message-ID: <200304161249.h3GCntqZ071047@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304161249.h3GCntqZ071047>