https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104215
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- The use in your example is undefined in C (as is any other use of an indeterminate pointer value). C++ made using pointers made it implementation-defined a few years ago while still allowing for it to crash, which is still effectively undefined. The warning for your example (equality) only triggers at level 3 (which is not the default in -Wall) to accommodate the C++ decision.