C actually
insists that address 0 is an invalid address!
Pedantically: not quite. It says
that 0 is the token representing a
null address.
Not quite. There is no such thing as "a null address". Each pointer
type has a distinguished value, termed a "null" pointer of that type,
which does not point to any object, and which can be obtained by
converting an integer constant expression with value 0 (of which a bare
0 is just one example), or such an expression cast to type "pointer to
void", to the relevant pointer type. (This conversion may occur by
casting, by assignment, by parameter passing....)
Whether pointers are "addresses" - indeed, whether an "address" is a
useful concept - is a matter for the implementation. I recall hearing
of a C implementation for a Lisp Machine in which pointers were
implemented as <array,index> pairs.
It doesn't say that the encoding of such a pointer
is the same as
that of the integer 0.
Right. Indeed, the encoding of a null pointer may vary from type to
type (within certain bounds; as a simple example, char * and void *, by
special fiat, must use the same representation).
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B