https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87934
Bug ID: 87934 Summary: [8 regression] struct with NSDMI of enum makes initialization a non-constant expression Product: gcc Version: 8.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following code does not compile in g++8 and trunk, while it compiles with g++7 and older. struct Foo { enum { BAR } bar = BAR; }; constexpr Foo foo{}; If bar NSDMI is changed to {}, it works. Also explicitly providing initializer in foo variable declaration fixes it as well.