Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 2003 15:23:03 +0100 (CET)
From:      Harti Brandt <brandt@fokus.fraunhofer.de>
To:        Tony Finch <dot@dotat.at>
Cc:        sparc64@freebsd.org
Subject:   Re: 64bit NULL?
Message-ID:  <20031027152139.C63585@beagle.fokus.fraunhofer.de>
In-Reply-To: <20031027141123.GB22725@chiark.greenend.org.uk>
References:  <20031027144140.V63585@beagle.fokus.fraunhofer.de> <20031027141123.GB22725@chiark.greenend.org.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 27 Oct 2003, Tony Finch wrote:

TF>On Mon, Oct 27, 2003 at 02:49:51PM +0100, Harti Brandt wrote:
TF>>
TF>> According to ISO-C NULL is a symbol that
TF>> defines a null pointer so that:
TF>>
TF>> 	execl(..., NULL)
TF>>
TF>> appears to be legal, yet will probably cause failure on FreeBSD-sparc64.
TF>
TF>No, NULL is an implementation-defined null pointer constant, not a null
TF>pointer. The difference is that a null pointer constant is an integer
TF>constant expression that evaluates to zero (optionally cast to void*),
TF>and a null pointer is a null pointer constant converted to a pointer type
TF>(which might involve changes in representation). Therefore using a bare
TF>NULL to terminate the execl argument list is not in general legal.

Thanks, Tony. I found the relevant place (6.3.2.3). This sounds logical.

harti
-- 
harti brandt,
http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private
brandt@fokus.fraunhofer.de, harti@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031027152139.C63585>