https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124935
--- Comment #3 from Heiko Eißfeldt <heiko at hexco dot de> --- updated to include an nullptr_t pointer: https://godbolt.org/z/drEjGoWYK ```C #include <stddef.h> int main(void) { void *v; char *c; nullptr_t *n; if (c < (char *)0) /* no warning with -Wextra why? */ if (c < (char *)nullptr) /* no warning with -Wextra why? */ if (c < nullptr) /* ordered comparison of pointer with integer zero? */ if (v < nullptr) /* ordered comparison of pointer with integer zero? */ if (n < nullptr) /* ordered comparison of pointer with integer zero? */ return v < (void *)0; /* ordered comparison of pointer with null pointer */ } ``` The only type that is considered for a null pointer seems to be void *.
