https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117629
Bug ID: 117629 Summary: Redefinition of bool type in C23 could have better diagnostic Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- With -std=gnu23 (the new default), a common issue in applications is: ``` typedef int bool; ``` With gnu23, this errors out as: ``` <source>:1:13: error: two or more data types in declaration specifiers 1 | typedef int bool; | ^~~~ <source>:1:1: warning: useless type name in empty declaration 1 | typedef int bool; | ^~~~~~~ Compiler returned: 1 ``` It'd be nice if we could diagnose what's happening here (bool is a type, please don't redeclare it, ...).