https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109542
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- You can either perform the arithmetic using intptr_t or uintptr_t, or use -fdelete-null-pointer-checks (as the documentation for that option explains). Also I would expect a volatile char* to be used for such accesses.