Re: NULL vs 0 vs 0L bikeshed time

From: Bruce Evans <bde_at_zeta.org.au>
Date: Tue, 2 Mar 2004 16:46:18 +1100 (EST)
On Mon, 1 Mar 2004, Erik Trulsson wrote:

> On a related note, is there some particular reason for having the C++
> definition depend on __LP64__ or could one not just as well define NULL
> as (0L) all the time there?

Mainly the same reason that 0 was only changed to (void *)0 (sic) for
the _KERNEL_ case only, but more so: the type sizes may be different
so sloppy but working code may break.

> (I.e. is there any platform FreeBSD runs on that have 32-bit longs and
> 64-bit pointers, or does all of them have pointers and long being the
> same size?)

Someone mentioned that i386's can have 64-bit longs (IP32L64).  I had
this booting and running most utilities, but it couldn't quite build
itself and I haven't run it for a year or two.

Bruce
Received on Mon Mar 01 2004 - 20:47:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:45 UTC