https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116239
Bug ID: 116239 Summary: Different function redeclaration in function scope is wrongly accepted Product: gcc Version: 14.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- This is an invalid program ``` void f(void); int main() { consteval void f(void); } ``` because of function f redeclaration with consteval. It is rejected in Clang and MSVC, but not in GCC unfortunately. Online demo: https://gcc.godbolt.org/z/n8x49h8Wa Expected error: redeclaration 'consteval void f()' differs in 'consteval' from previous declaration