https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96256
Bug ID: 96256 Summary: Invalid consteval call not rejected Product: gcc Version: 11.0 URL: https://godbolt.org/z/zeEY96 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/zeEY96. ```C++ struct X { consteval X operator+() const { return {}; } }; consteval void g(X) { } void f() { X x; +x; g(x); } ``` This might generalize https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95593.