https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89481
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-02-25 CC| |jakub at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- GCC trunk starting with r269052 aka PR89336 fix will reject this too for -std=c++14 and -std=c++17 too: pr89481.C:20:29: in ‘constexpr’ expansion of ‘all_zeros()’ pr89481.C:10:32: error: change of the active member of a union from ‘all_zeros()::mix::numeric’ to ‘all_zeros()::mix::bytes’ 10 | zero.bytes[sizeof(double)] = '\0'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ It is accepted with -std=c++2a where changing of active member is allowed.