home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / std / cplus / 1895 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.5 KB  |  37 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: <1992Dec22.174327.8903@lpi.liant.com>
  6. Sender: pkt@lpi (Scott Turner)
  7. Organization: Liant Software Corporation
  8. References: <1992Dec19.001851.22116@microsoft.com>
  9. Date: Tue, 22 Dec 1992 17:43:27 GMT
  10. Lines: 25
  11.  
  12. In article <1992Dec19.001851.22116@microsoft.com>, jimad@microsoft.com (Jim Adcock) writes:
  13. > On the contrary, for the test to not prove true would
  14. > mean that the empty base class part has to be implemented by the compiler
  15. > using gratuitous padding, and gratuitous padding is an anathema to
  16. > traditional C/C++ implementation.  
  17.  
  18. "Gratuitous" is your own judgment.  Some of us disagree.
  19.  
  20. Moreover, such padding is in the C++ tradition.  The ARM requires padding 
  21. in two places, where the principal intent is to support
  22.  
  23.             p and q point to different objects implies p!=q
  24.  
  25.     1. 5.3.2 "The size of any class object is larger than zero."
  26.  
  27.     2. 5.3.3 "This implies that an operator new() can be called with an
  28.        argument zero.  In this case, a pointer to an object is returned.
  29.        Repeated such calls return pointers to different objects."
  30.        [An example follows to demonstrate that the intent is that
  31.        distinguishable pointers values be returned.]
  32. --
  33. Prescott K. Turner, Jr.
  34. Liant Software Corp. (developers of LPI languages)
  35. 959 Concord St., Framingham, MA 01701 USA    (508) 872-8700
  36. UUCP: uunet!lpi!pkt                          Internet: pkt@lpi.liant.com
  37.