https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112556
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- Yes, this is a bug; null_pointer_constant_p gets this right, but convert_for_assignment fails to handle enumerations and booleans as possible null pointer constants. Other contexts such as comparisons and conditional expressions appear to be OK (through performing integer promotions so that enumerations and booleans can't appear, for example, or through handling all kinds of integer types together).