home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1849 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.7 KB  |  39 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
  3. From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
  4. Subject: Re: Zero-length structures and pointer comparisons
  5. Message-ID: <1992Dec18.190755.15392@ucc.su.OZ.AU>
  6. Sender: news@ucc.su.OZ.AU
  7. Nntp-Posting-Host: extro.ucc.su.oz.au
  8. Organization: MAXTAL P/L C/- University Computing Centre, Sydney
  9. References: <1992Dec15.162202.11231@ucc.su.OZ.AU> <1992Dec17.150914.2783@lpi.liant.com> <BzG1Jx.JH@frumious.uucp>
  10. Date: Fri, 18 Dec 1992 19:07:55 GMT
  11. Lines: 26
  12.  
  13. In article <BzG1Jx.JH@frumious.uucp> uunet.ca!frumious!pat writes:
  14. >|
  15. >|> So the question is really whether the requirement that pointers to
  16. >|> the same object compare equal should be left implementation defined.
  17. >
  18. >Here I would disagree.  I think the question is whether, if the C++
  19. >standard adopts the same notions of conformity as the C standard,
  20. >pointers to the same object should be required to compare equal
  21. >in a conforming program.
  22. >
  23. >And the answer is _no_.  
  24.  
  25.     Well, either way, this is not what the ARM says.
  26. I would expect that pointers should compare equal after assignment
  27. or initialisation (assuming they're the same type). And other
  28. operations we could list.
  29.  
  30.     However, if raw pointers were supplied by an external source
  31. such as the OS, I would prefer the answer be 'implementation defined'.
  32. I dont know if this is workable, but the current status seems overly
  33. restrictive.
  34. -- 
  35. ;----------------------------------------------------------------------
  36.         JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
  37.     Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
  38. ;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
  39.