Date: Mon, 27 Oct 2003 14:11:23 +0000 From: Tony Finch <dot@dotat.at> To: Harti Brandt <brandt@fokus.fraunhofer.de> Cc: sparc64@freebsd.org Subject: Re: 64bit NULL? Message-ID: <20031027141123.GB22725@chiark.greenend.org.uk> In-Reply-To: <20031027144140.V63585@beagle.fokus.fraunhofer.de> References: <20031027144140.V63585@beagle.fokus.fraunhofer.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 27, 2003 at 02:49:51PM +0100, Harti Brandt wrote: > > According to ISO-C NULL is a symbol that > defines a null pointer so that: > > execl(..., NULL) > > appears to be legal, yet will probably cause failure on FreeBSD-sparc64. No, NULL is an implementation-defined null pointer constant, not a null pointer. The difference is that a null pointer constant is an integer constant expression that evaluates to zero (optionally cast to void*), and a null pointer is a null pointer constant converted to a pointer type (which might involve changes in representation). Therefore using a bare NULL to terminate the execl argument list is not in general legal. Tony. -- f.a.n.finch <dot@dotat.at> http://dotat.at/ GERMAN BIGHT: SOUTHWEST 5 OR 6. OCCASIONAL RAIN. MODERATE OR GOOD.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031027141123.GB22725>