From owner-freebsd-sparc64@FreeBSD.ORG Mon Oct 27 06:11:25 2003 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 582B816A4BF; Mon, 27 Oct 2003 06:11:25 -0800 (PST) Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [193.201.200.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9D0543FD7; Mon, 27 Oct 2003 06:11:24 -0800 (PST) (envelope-from fanf@chiark.greenend.org.uk) Received: by chiark.greenend.org.uk (Debian Exim 3.35 #1) with local id 1AE85b-00046m-00; Mon, 27 Oct 2003 14:11:23 +0000 Date: Mon, 27 Oct 2003 14:11:23 +0000 From: Tony Finch To: Harti Brandt Message-ID: <20031027141123.GB22725@chiark.greenend.org.uk> References: <20031027144140.V63585@beagle.fokus.fraunhofer.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031027144140.V63585@beagle.fokus.fraunhofer.de> User-Agent: Mutt/1.3.28i Sender: Tony Finch cc: standards@freebsd.org cc: sparc64@freebsd.org Subject: Re: 64bit NULL? X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2003 14:11:25 -0000 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 http://dotat.at/ GERMAN BIGHT: SOUTHWEST 5 OR 6. OCCASIONAL RAIN. MODERATE OR GOOD.