Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!samsung!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: null pointers [joke?] Message-ID: <11432@smoke.BRL.MIL> Date: 27 Oct 89 19:49:57 GMT References: <11380@smoke.BRL.MIL> <8952@goofy.megatest.UUCP> <872.254895b5@csc.anu.oz> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <872.254895b5@csc.anu.oz> bdm659@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.