This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
[Moved to DR at the October, 2012 meeting.]
According to 11.5 [class.union] paragraph 7,
A union for which objects or pointers are declared is not an anonymous union.
This should also apply to references, which are now possible because decltype allows writing an initializer for an unnamed union:
char buf[100]; union { int i; } &r = (decltype(r)) buf;
Proposed resolution (February, 2012):
Change 11.5 [class.union] paragraph 7:
A union for which objects,
orpointers, or references are declared is not an anonymous union. [Example:void f() { union { int aa; char* p; } obj, *ptr = &obj; aa = 1; // error ptr->aa = 1; // OK }