home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / std / cplus / 1885 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.0 KB  |  52 lines

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