aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-09-02 09:05:05 +0930
committerAlan Modra <amodra@gmail.com>2021-09-22 17:14:17 +0930
commitb0321032658d875bee7584d8e3a8cbdd275c99d5 (patch)
tree09434b749884e6286edfef2caddc5a6155367831 /gcc/fortran/trans-expr.c
parenta9b3c451be58f0fe660154323ace7ba72a4211ec (diff)
downloadgcc-b0321032658d875bee7584d8e3a8cbdd275c99d5.zip
gcc-b0321032658d875bee7584d8e3a8cbdd275c99d5.tar.gz
gcc-b0321032658d875bee7584d8e3a8cbdd275c99d5.tar.bz2
obstack.h __PTR_ALIGN vs. ubsan
Current ubsan complains on every use of __PTR_ALIGN (when ptrdiff_t is as large as a pointer), due to making calculations relative to a NULL pointer. This patch avoids the problem by extracting out and simplifying __BPTR_ALIGN for the usual case. I've continued to use ptrdiff_t here, where it might be better to throw away __BPTR_ALIGN entirely and just assume uintptr_t exists. * obstack.h (__PTR_ALIGN): Expand and simplify __BPTR_ALIGN rather than calculating relative to a NULL pointer.
Diffstat (limited to 'gcc/fortran/trans-expr.c')
0 files changed, 0 insertions, 0 deletions