🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #859

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

#859
From: David Adrien Tanguay
Date: Fri, 27 Oct 1989 22:19
19 lines
1153 bytes
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 .

(int *) 0 is not a pointer to an object, so section 3.3.9 doesn't come
into play.

:Brendan McKay.  bdm@anucsd.oz  or  bdm@anucsd.oz.au  (via uunet.uu.net)

David Tanguay
Technical Details
Message-ID: <30809@watmath.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!datanguay
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!utgpu!watmath!datanguay
From: datanguay@watmath.waterloo.edu (David Adrien Tanguay)
Newsgroups: comp.std.c
Subject: Re: null pointers [joke?] (was: commom malloc/free practice ...)
Message-ID: <30809@watmath.waterloo.edu>
Date: 27 Oct 89 22:19:27 GMT
References: <11380@smoke.BRL.MIL> <8952@goofy.megatest.UUCP> <872.254895b5@csc.anu.oz>
Reply-To: datanguay@watmath.waterloo.edu (David Adrien Tanguay)
Organization: U. of Waterloo, Ontario
Lines: 21