https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110238
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |10.5 Ever confirmed|0 |1 Last reconfirmed| |2023-06-13 Summary|Incorrect "comparison |[10/11/12/13/14 Regression] |between pointer and zero |Incorrect "comparison |character constant" warning |between pointer and zero |when comparing pointer to |character constant" warning |unsigned null pointer |when comparing pointer to |constant |unsigned null pointer | |constant Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, introduced with r7-5677-ga9342885b149 . So I think the issue is in char_type_p we have: ``` static bool char_type_p (tree type) { return (type == char_type_node || type == unsigned_char_type_node || type == signed_char_type_node || type == char16_type_node || type == char32_type_node); } ``` In C, there is no distinct type for char32_type_node so it is the same as unsigned here and it returns true for that case .