https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97659
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- That sanitizer diagnoses http://eel.is/c++draft/expr.add#5.3 which still seems UB. Of course there can be bugs on the sanitizer side too; the sanitizer generally works by scanning the shadow memory in between the two pointers and if it finds an unaccessible byte in there (memory not part of an object, e.g. the inter-object redzone), it shall diagnose it.