https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97976
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- 6.3.2.3 p3 says a null pointer compares unequal to any pointer to an object, so that means no object can ever be at address 0 in a valid C program. If you're not using the -fno-delete-null-pointer-checks option then GCC is perfectly justified to assume no object is at address 0 (because the standards say that's not possible). The footnote on 6.5.3.2 clarifies that a null pointer is not a valid operand for the unary * operator. For C++, [basic.compound] says a pointer can point to an object or be null, not both.