null pointers [joke?]
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat Oct 28 05:49:57 AEST 1989
In article <872.254895b5 at csc.anu.oz> bdm659 at csc.anu.oz writes:
- Section 3.2.2.3 (on the result of casting 0 to a pointer type):
- "Such a pointer, called a null pointer, is guaranteed not to
- point to any object or function."
- Section 3.3.9 (on pointer equality):
- "If two pointers to object or incomplete types compare equal,
- they point to the same object."
-From these two rules, it logically follows that (int*)0 != (int*)0 .
Of course this is utter nonsense. The conclusion does not follow
from those rules. (int*)0 is not a pointer to an object or an
incomplete type.
More information about the Comp.std.c
mailing list