https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109590
--- Comment #4 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Jonny Grant from comment #2) > (In reply to Andrew Pinski from comment #1) > > There is -Wnull-dereference for this ... > > I agree. I set that -Wnull-dereference in usual projects (it doesn't seem to > get enabled by -Wall -Wextra) > > I just expected -Warray-bounds to get the 0x0 address too There is no reason to expect this. There is no array at 0x0 address. The warning for *p in your case is already complained as false warning in another PR (I cannot remember the number, but I'm sure there is such a PR).