Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Mar 2004 18:32:31 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Thomas David Rivers <rivers@dignus.com>
Cc:        mark@grondar.org
Subject:   Re: NULL vs 0 vs 0L bikeshed time
Message-ID:  <20040301173231.GA61430@falcon.midgard.homeip.net>
In-Reply-To: <200403011707.i21H7bY96897@lakes.dignus.com>
References:  <xzpoergtt6z.fsf@dwp.des.no> <200403011707.i21H7bY96897@lakes.dignus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 01, 2004 at 12:07:37PM -0500, Thomas David Rivers wrote:
> >=20
> > Mark Murray <mark@grondar.org> 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
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



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