Creating pointer with all bits 0 (was: Referencing NULL pointers)

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Sep 9 11:14:27 AEST 1989


In article <10816 at riks.csl.sony.co.jp> diamond at riks. (Norman Diamond) writes:
>In article <1989Sep6.052228.17374 at algor2.algorists.com> jeffrey at algor2.UUCP (Jeffrey Kegler) writes:
>>Question: Is an implementation whose null pointer is the same as the
>>result of some integer-to-pointer cast conforming?  Apparently not,
>>since 3.2.2.3 states, "... a null pointer is guaranteed to compare
>>unequal to a pointer to any object or function."

The code is already not strictly conforming, since the requisite cast
is implementation-dependent.

>This looks like a bit of a problem all right.  Can it still be fixed
>by editorial change?  For example, "... any legally created object or
>function" or "... any C object or function."

It's not a problem.  The Standard only talks about objects and functions
in its context; they're technical C-specific terms.



More information about the Comp.lang.c mailing list