Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!oliveb!mipos3!omepd!davidl From: davidl@intelob.intel.com (David Levine) Newsgroups: comp.lang.c Subject: Re: pointer equality (was: Re: pointer representation (was: ...)) Message-ID: Date: 19 Sep 89 14:25:21 GMT References: <319@cubmol.BIO.COLUMBIA.EDU> <3756@buengc.BU.EDU> <29171@news.Think.COM> <2079@munnari.oz.au> <10840@riks.csl.sony.co.jp> Sender: news@omepd.UUCP Followup-To: comp.lang.c Organization: BiiN Information Systems, Hillsboro, Oregon Lines: 30 In-reply-to: diamond@csl.sony.co.jp's message of 14 Sep 89 03:36:26 GMT In article <10840@riks.csl.sony.co.jp> diamond@csl.sony.co.jp (Norman Diamond) writes: > In article <2079@munnari.oz.au> ok@cs.mu.oz.au (Richard O'Keefe) writes: > >People are encouraged to think of == as testing for EQUALITY. > >In dpANS C, [in the case of pointers] it appears that == does *NOT* > >have the properties of equality, and at the very least this needs to > >be said clearly and explicitly in the Rationale. > > In fact, it calls for a note in the Standard, in the section defining > the == operator. Surely no one can claim that this effect of the rule > is obvious, or that it yields the least surprising results. I'm sorry, I must have missed something. I was on vacation for two weeks; perhaps the referenced article expired. Now I've waited almost a week for someone to follow this one up, but apparently nobody else is, so: Why do you claim that == doesn't test for equality on pointers? The dpANS tells us that two pointers are equal if they point to the same object; isn't that the only possible portable definition of pointer equality? (I DON'T want a definition of pointer equality that compares bit patterns.) As I said, perhaps I've missed something. David D. Levine BBBBBBBBB IIII IIII NNN NNNN TM Senior Technical Writer BBBB BBBB iiii iiii NNNN NNNN BBBBBBBBB IIII IIII NNNNNNNNN UUCP: ...[!uunet]!tektronix!biin!davidl BBBB BBBB IIII IIII NNNN NNNN MX-Internet: BBBBBBBBB IIII IIII NNNN NNN ARPA: <@iwarp.intel.com:davidl@intelob.intel.com>