Title 57. Empty unions
Status open Section 12.3 [class.union]
Submitter Steve Adamczyk

Created on 1998-10-13.00:00:00 by admin, last changed by admin.

msg412 (view) Date: 2000-10-15.00:00:00

Notes from 10/00 meeting: The resolution to issue 178, which was accepted as a DR, addresses the first point above (default initialization). The other questions have not yet been decided, however.

msg57 (view) Date: 2018-02-27.00:00:00

There doesn't seem to be a prohibition in 12.3 [class.union] against a declaration like

    union { int : 0; } x;
Should that be valid? If so, 11.6 [dcl.init] paragraph 5 third bullet, which deals with default-initialization of unions, should say that no initialization is done if there are no data members.

What about:

    union { } x;
    static union { };
If the first example is well-formed, should either or both of these cases be well-formed as well?

(See also the resolution for issue 151.)

Date User Action Args
2018-02-27 00:00:00adminsetsection: 9.3 [class.union] -> 12.3 [class.union]
2017-02-06 00:00:00adminsetsection: 9.5 [class.union] -> 9.3 [class.union]
2000-11-18 00:00:00adminsetmessages: + msg412
1998-10-13 00:00:00admincreate