Subject: Re: NULL pointer return values
To: None <tech-kern@netbsd.org>
From: Matthew Mondor <mmondor@gobot.ca>
List: tech-kern
Date: 04/22/2002 04:41:30
> Assuming that the bit pattern stored in a pointer storing a "null
> pointer" is all-bits-zero is incorrect.  Assuming that "p = 0" sets p to
> a null pointer is explicitly sanctioned by the standard.

If on an arch which didn;t use 0 for a NULL pointer, and compiler allowed to internally assign NULL if we assign constant 0 to a pointer, how would one address memory at 0x000000000, unless using something like

long *ptr;
bset(&ptr, 0, sizeof(long *));

or

long *ptr = 0;
ptr -= ptr;

unless

long *ptr = 0x00000000;

is actually not considered constant 0