[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 1 21:12:39 GMT 2021


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

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The array is not needed to reproduce this though:
struct Foo {
    constexpr Foo() {}
};

union U {
   // struct {} monostate = {};
    Foo foo;
    constexpr U() {}
};
constexpr U s;


More information about the Gcc-bugs mailing list