On Fri, Oct 06, 2017 at 10:30:11AM -0600, Martin Sebor wrote:
> I think that should work too.  ptrdiff_t is usually the same size
> as size_t.  The two exceptions I could find are VMS and the M32C
> target where size_t is always 32-bits wide but ptrdiff_t can be
> 64-bits.  I don't know what that might mean for the sanitizer (or
> if it's even supported there).

-fsanitize=pointer-overflow does nothing
if (TYPE_PRECISION (sizetype) != POINTER_SIZE)
But the runtime library is supported only on
  x86_64-*-linux* | i?86-*-linux*)
  powerpc*-*-linux*)
  sparc*-*-linux*)
  s390*-*-linux*)
  arm*-*-linux*)
  aarch64*-*-linux*)
  x86_64-*-darwin[1]* | i?86-*-darwin[1]*)
anyway, and on all these targets the sizes are the same and so
is ptrdiff_t.

        Jakub

Reply via email to