Created on 2026-01-23.00:00:00 last changed 5 days ago
Proposed resolution (approved by CWG 2026-02-06):
Change in 6.8.2 [intro.object] paragraph 10 as follows:
... The address of a subobject of zero size is the address of an unspecified byte of storage occupied by the complete object of that subobject.Given two complete objects with overlapping lifetimes, a byte in the object representation of one may have the same address as a byte in the object representation of the other if
otherwise, such bytes have distinct addresses.
- one object is nested within the other or
- they are both potentially non-unique objects;
Consider:
struct A {
char c;
int i;
} a;
char d;
There is likely going to be padding between a.c and a.i. For lack of an explicit prohibition, the implementation could put d into that padding. This is undesirable.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-02-06 22:00:31 | admin | set | status: open -> tentatively ready |
| 2026-01-25 08:23:54 | admin | set | messages: + msg8465 |
| 2026-01-23 00:00:00 | admin | create | |