https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117981
Bug ID: 117981 Summary: -Wc11-c23-compat does not warn for bool, false and true Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: vincent-gcc at vinc17 dot net Target Milestone: --- Consider int f (void) { int bool = 3; int false = 4; int true = 5; return bool + false + true; } Compiling with "-Wc11-c23-compat -c" does not emit any warning. This can be reproduced with gcc-14 (Debian 14.2.0-8) 14.2.0 and gcc (Debian 20241123-1) 15.0.0 20241123 (experimental) [master r15-5606-g4aa4162e365] but for the latter, one needs "-std=c11 -Wc11-c23-compat -c" to test the -Wc11-c23-compat feature. Otherwise, one gets an error, whether -Wc11-c23-compat is used or not, because this version compiles in C23 mode by default.