This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 113d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-03-20


1189. Address of distinct base class subobjects

Section: 6.7.2  [intro.object]     Status: C++11     Submitter: Gabriel Dos Reis     Date: 2010-08-31

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

6.7.2 [intro.object] paragraph 6 says,

Two distinct objects that are neither bit-fields nor base class subobjects of zero size shall have distinct addresses.

This formulation leaves open the possibility that two base class subobjects of the same type could have the same address (because one or both might be zero-length base class subobjects).

Proposed resolution (November, 2010) [SUPERSEDED]:

Change 6.7.2 [intro.object] paragraph 6 as follows:

Unless an object is a bit-field or a base class subobject of zero size, the address of that object is the address of the first byte it occupies. Two distinct objects that are neither not bit-fields nor base class subobjects of zero size shall have distinct addresses, if both have the same type or if not both are base class subobjects of zero size...