https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80077
Bug ID: 80077 Summary: constant expressions and -fno-elide-constructors Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kaballo86 at hotmail dot com Target Milestone: --- The following snippet, extracted from libstdc++, causes the compiler to generate an error when compiled using -fno-elide-constructors under C++11/14: /// piecewise_construct_t struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; /// piecewise_construct constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); // error: modification of 'piecewise_construct' is not a constant expression This appears to be a regression from 6.3.0.