https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85717

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This behaviour is required by the C++ standard, GCC is not allowed to change
it.

In C++20 you will be able to use designated-initializers to select which me,ber
of the union to initialize:

t1 = { 1 ,"a", { .real=3.4 } } ;
t1 = { 1 ,"a", { .integer = 2 } } ;

Reply via email to