https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117633
Bug ID: 117633 Summary: system.h still does a define bool to unsigned char even for C23 Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: internal-improvement Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- GCC's system.h currently does: ``` /* Provide a fake boolean type. We make no attempt to use the C99 _Bool, as it may not be available in the bootstrap compiler, and even if it is, it is liable to be buggy. This must be after all inclusion of system headers, as some of them will mess us up. */ #undef TRUE #undef FALSE #ifdef __cplusplus /* Obsolete. */ # define TRUE true # define FALSE false #else /* !__cplusplus */ # undef bool # undef true # undef false # define bool unsigned char # define true 1 # define false 0 /* Obsolete. */ # define TRUE true # define FALSE false #endif /* !__cplusplus */ ``` Though I am not sure if system.h is ever included in C programs any more. But maybe we should fix this to use C23's bool if we are compiling for C23 ...