home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / std / cplus / 1879 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.9 KB  |  41 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: Zero-length structures and pointer comparisons
  5. Message-ID: <9235623.27245@mulga.cs.mu.OZ.AU>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Computer Science, University of Melbourne, Australia
  8. References: <1992Dec14.225659.24225@microsoft.com> <1992Dec16.150144.6004@ucc.su.OZ.AU> <BzDJHu.t2@frumious.uucp> <1992Dec18.195647.20074@ucc.su.OZ.AU>
  9. Date: Mon, 21 Dec 1992 12:59:46 GMT
  10. Lines: 29
  11.  
  12. (Sorry for the zillions of articles I seem to have posted today,
  13. I'm just trying to keep up with maxtal ;-)
  14.  
  15. maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
  16.  
  17. >    Thats not the issue. It might be UNIMPLEMENTABLE on
  18. >some architectures. In fact, == is UNIMPLEMENTABLE in general
  19.                                                     ^^^^^^^^^^
  20. >on the 386 in protected mode, given the sloppy definition
  21. >of 'same object' in the ARM. Its quite possible on the 386
  22. >to have two logical addresses which convert to the 
  23. >same linear address, but NOT BE ABLE TO TELL THAT THIS IS THE CASE.
  24. >Because to tell implies access to the LDT/GDT and the typical
  25. >process is not able to read those tables. A special
  26. >operating system function would be required to do this,
  27. >and that would make C++ unimplementable on systems not
  28. >having this function.
  29.  
  30. C++ implementations are not required to implement the correct
  31. semantics for == in the general case, they only have to do so
  32. for conforming programs. The compiler could ensure that
  33. conforming programs never create two logical addresses which
  34. map to the same linear address, and then the problem would not arise.
  35.  
  36. -- 
  37. Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
  38. This .signature virus is a self-referential statement that is true - but 
  39. you will only be able to consistently believe it if you copy it to your own
  40. .signature file!
  41.