From owner-freebsd-current@FreeBSD.ORG Mon Mar 1 09:32:34 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23CBF16A4CE for ; Mon, 1 Mar 2004 09:32:34 -0800 (PST) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by mx1.FreeBSD.org (Postfix) with SMTP id E8C3243D4C for ; Mon, 1 Mar 2004 09:32:32 -0800 (PST) (envelope-from ertr1013@student.uu.se) Received: (qmail 61450 invoked by uid 1001); 1 Mar 2004 17:32:31 -0000 Date: Mon, 1 Mar 2004 18:32:31 +0100 From: Erik Trulsson To: Thomas David Rivers Message-ID: <20040301173231.GA61430@falcon.midgard.homeip.net> Mail-Followup-To: Thomas David Rivers , des@des.no, mark@grondar.org, current@freebsd.org References: <200403011707.i21H7bY96897@lakes.dignus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <200403011707.i21H7bY96897@lakes.dignus.com> User-Agent: Mutt/1.5.6i cc: des@des.no cc: current@freebsd.org cc: mark@grondar.org Subject: Re: NULL vs 0 vs 0L bikeshed time X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2004 17:32:34 -0000 On Mon, Mar 01, 2004 at 12:07:37PM -0500, Thomas David Rivers wrote: > >=20 > > Mark Murray writes: > > > I'd like to commit the following patch. It makes sure that for C > > > and the kernel, NULL is a ((void *)0) > >=20 > > This is not correct, because it makes NULL unusable for function > > pointers; you can assign 0 to a function pointer, but not (void *)0. > >=20 > > DES > > --=20 > > Dag-Erling Sm=F8rgrav - des@des.no >=20 > =20 > That assignment seems to work... I thought (void *) was assignable to > any function pointer... (Isn't (void *) assignable to any pointer?) To any _object_ pointer, not to a function pointer. Null pointers are special however. --=20 Erik Trulsson ertr1013@student.uu.se