https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99235
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Once a pointer is "valid", it can never become a null pointer if decremented or incremented. So this code is undefined and GCC is doing an ok thing to do.