home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c++
- Path: sparky!uunet!titan!lpi!pkt
- From: pkt@lpi.liant.com (Scott Turner)
- Subject: Re: Pointer comparisons
- Message-ID: <1992Dec22.174327.8903@lpi.liant.com>
- Sender: pkt@lpi (Scott Turner)
- Organization: Liant Software Corporation
- References: <1992Dec19.001851.22116@microsoft.com>
- Date: Tue, 22 Dec 1992 17:43:27 GMT
- Lines: 25
-
- In article <1992Dec19.001851.22116@microsoft.com>, jimad@microsoft.com (Jim Adcock) writes:
- > On the contrary, for the test to not prove true would
- > mean that the empty base class part has to be implemented by the compiler
- > using gratuitous padding, and gratuitous padding is an anathema to
- > traditional C/C++ implementation.
-
- "Gratuitous" is your own judgment. Some of us disagree.
-
- Moreover, such padding is in the C++ tradition. The ARM requires padding
- in two places, where the principal intent is to support
-
- p and q point to different objects implies p!=q
-
- 1. 5.3.2 "The size of any class object is larger than zero."
-
- 2. 5.3.3 "This implies that an operator new() can be called with an
- argument zero. In this case, a pointer to an object is returned.
- Repeated such calls return pointers to different objects."
- [An example follows to demonstrate that the intent is that
- distinguishable pointers values be returned.]
- --
- Prescott K. Turner, Jr.
- Liant Software Corp. (developers of LPI languages)
- 959 Concord St., Framingham, MA 01701 USA (508) 872-8700
- UUCP: uunet!lpi!pkt Internet: pkt@lpi.liant.com
-