https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94066
--- Comment #8 from CVS Commits ---
The master branch has been updated by Patrick Palka :
https://gcc.gnu.org/g:b599bf9d6d1e180d350b71e51e08a66a1bb1546a
commit r10-7313-gb599bf9d6d1e180d350b71e51e08a66a1bb1546a
Author: Patrick Palka
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94066
Patrick Palka changed:
What|Removed |Added
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94066
--- Comment #7 from Hubert Tong ---
(In reply to Jakub Jelinek from comment #6)
> The standard seems to say a union member becomes active when the constructor
> finishes, not when it starts, so what wording prevents changing the active
> member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94066
--- Comment #6 from Jakub Jelinek ---
The standard seems to say a union member becomes active when the constructor
finishes, not when it starts, so what wording prevents changing the active
member during the construction?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94066
--- Comment #5 from Patrick Palka ---
Also if we add an explicitly defaulted constructor "U() = default;" to U in the
original test case, then
using GCC 9 /w -std=c++17 we get:
94066.C:16:25: in ‘constexpr’ expansion of ‘foo((&*this))’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94066
Patrick Palka changed:
What|Removed |Added
CC||ppalka at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94066
--- Comment #3 from Jakub Jelinek ---
clang++ diagnostics is
assignment to member 'y' of union with active member 'a' is not allowed in a
constant expression
Note, in C++17 things are clear and we shouldn't reject all changes of union
active
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94066
Jakub Jelinek changed:
What|Removed |Added
Priority|P3 |P2
CC|