https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95279
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #9) > pointer-overflow is a cheap check without any context, for ptr + off > it will do > uintptr_t res = (uintptr_t) ptr + off; > if (((intptr_t) res) < 0 ? res > (uintptr_t) ptr : res < (uintptr_t) ptr) > runtime_diagnostics (); Mistyped, (intptr_t) off rather than (intptr_t) res obviously.