https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99700
Bug ID: 99700 Summary: gcc takes an uninitialized variable as a constant expression Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- https://godbolt.org/z/93qM1b ==== struct A { constexpr A() { c[0] = 0; } char c[2]; }; constexpr A a; ====