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

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
  3. From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
  4. Subject: Re: Pointer comparisons
  5. Message-ID: <9236506.8328@mulga.cs.mu.OZ.AU>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Computer Science, University of Melbourne, Australia
  8. References: <1992Dec19.001851.22116@microsoft.com> <1992Dec23.182456.17185@lucid.com> <1992Dec24.200201.25709@microsoft.com> <1992Dec28.175218.15539@microsoft.com> <1992Dec29.042828.27808@lucid.com> <713@muller.loria.fr>
  9. Date: Tue, 29 Dec 1992 19:13:45 GMT
  10. Lines: 35
  11.  
  12. eker@loria.fr (Steven Eker) writes:
  13.  
  14. >jss@lucid.com (Jerry Schwarz) writes:
  15. >|> 
  16. >|>     A: Does the ARM currently require a1!=a2?  Apparently 
  17. >|>        not, but I may have overlooked something.
  18. >
  19. >Has anyone noticed that slist_base::get() on p266 C++PL (2ed) assumes that
  20. >pointers to different heap allocated objects compare unequal?
  21.  
  22. I hadn't noticed that one, but on page 238 in string::operator=() it
  23. assumes that pointers to different strings compare unequal, whether
  24. heap allocated, stack allocated, or statically allocated.
  25.  
  26. >Might this fail on a 486?
  27.  
  28. Yes, but only if the programmer had invoked some operating system memory
  29. mapping function, in which case the consequences are on that programmer's
  30. head. It is not a matter for the standard to worry about.
  31.  
  32. >There doesn't seem to be an easy fix for this example without maintaining
  33. >a separate tail pointer.
  34.  
  35. Hopefully we can all agree that there is plenty of code around like these
  36. two examples, which we don't want to break. Whatever wording is adpoted
  37. by the standard, these examples should continue to work unmodified.
  38.  
  39. Note carefully, however, that these examples do *not* depend on pointers
  40. to different *empty* objects comparing unequal.
  41.  
  42. -- 
  43. Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
  44. This .signature virus is a self-referential statement that is true - but 
  45. you will only be able to consistently believe it if you copy it to your own
  46. .signature file!
  47.