🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #853

Re: null pointers [joke?] (was: commom malloc/free practice ...)

#853
From: Joe English
Date: Fri, 27 Oct 1989 17:22
25 lines
1354 bytes
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 .

Not really; 3.3.9 says (loosely translated)

[(A and B point to an object) and (A == B)] ==> [it is the same object].  
  (1)                             (2)           (3)

If (1) is false it does not follow that (2) is false.
 

--Joe English

  jeenglis@nunki.usc.edu
Technical Details
Message-ID: <6054@merlin.usc.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!iuvax!cica!ctrsol!gem.mps.ohio-state.edu!apple!usc!merlin.usc.edu!nunki.usc.edu!jeenglis
References: <11380@smoke.BRL.MIL> <8952@goofy.megatest.UUCP> <872.254895b5@csc.anu.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!iuvax!cica!ctrsol!gem.mps.ohio-state.edu!apple!usc!merlin.usc.edu!nunki.usc.edu!jeenglis
From: jeenglis@nunki.usc.edu (Joe English)
Newsgroups: comp.std.c
Subject: Re: null pointers [joke?] (was: commom malloc/free practice ...)
Message-ID: <6054@merlin.usc.edu>
Date: 27 Oct 89 17:22:11 GMT
References: <11380@smoke.BRL.MIL> <8952@goofy.megatest.UUCP> <872.254895b5@csc.anu.oz>
Sender: news@merlin.usc.edu
Reply-To: jeenglis@nunki.usc.edu (Joe English)
Organization: University of Southern California, Los Angeles, CA
Lines: 25