home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c++
- Path: sparky!uunet!titan!lpi!pkt
- From: pkt@lpi.liant.com (Scott Turner)
- Subject: Re: Pointer comparisons
- Message-ID: <1992Dec21.184846.7440@lpi.liant.com>
- Sender: pkt@lpi (Scott Turner)
- Organization: Liant Software Corporation
- References: <1992Dec18.202539.22728@ucc.su.OZ.AU> <18188@autodesk.COM>
- Date: Mon, 21 Dec 1992 18:48:46 GMT
- Lines: 40
-
- In article <1992Dec18.202539.22728@ucc.su.OZ.AU>, maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
- > >"the result depends on the relative positions ... in the address
- > >space." What does this mean?
- >
- > This means that the committee has committed a grave error.
- > Too many Unix people. The ARM also commits this error in
- > assuming the existence of *an* address space.
-
- Implicit smiley detected :-) It actually means that the committee adopted
- the ARM's text as its base document and as the foundation of its working
- paper. The committee has not yet addressed the shortcomings of the ARM's
- 5.9 and 5.10.
-
- In article <18188@autodesk.COM> larsn@Autodesk.COM (Lars Nyman) writes:
-
- > ARM specifies what a comparison of two pointers to objects should return
- > IF:
- > - the objects are the same
- > - the objects are non-static members of same object
- > - the objects are elements of the same array
- >
- > Otherwise, the pointer comparison is implementation dependent.
- >
- >
- > So, if I have pointers to two different objects the result of comparing
- > them is implementation defined !?!
- > Thus, I cannot even trust that a '!=' test will return 1 for two objects
- > that are not the same !
- >
- > This must surely be wrong... can somebody, please, correct me and explain
- > what I'm overlooking.
-
- This problem has the same explanation. 5.9 and 5.10 need work
- before they're suitable for a standard. I avoid them when trying
- to understand the meaning of pointer comparison, and get out my C standard.
- --
- Prescott K. Turner, Jr.
- Liant Software Corp. (developers of LPI languages)
- 959 Concord St., Framingham, MA 01701 USA (508) 872-8700
- UUCP: uunet!lpi!pkt Internet: pkt@lpi.liant.com
-