diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-11-19 09:02:03 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-11-19 09:06:54 -0800 |
commit | 72473769f4c19e1b3e42f3ce4d54b973442bf7cb (patch) | |
tree | 2a18d99ccbe316c7e6fb768c7be5cc47952de2bf /lib/intprops.h | |
parent | 5c6bf411220ec1b1dbc57958759ffb092e3f832e (diff) | |
download | gnulib-72473769f4c19e1b3e42f3ce4d54b973442bf7cb.tar.gz |
intprops: speed up INT_MULTIPLY_WRAPV in GCC 9.3
* lib/intprops.h (INT_MULTIPLY_WRAPV): If GCC 9.3 or later, do not
work around GCC bug 91450 as the bug should be fixed there.
Diffstat (limited to 'lib/intprops.h')
-rw-r--r-- | lib/intprops.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/intprops.h b/lib/intprops.h index bc7e950a0e..6a49c5ad4f 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -373,9 +373,10 @@ _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW) #endif #if _GL_HAS_BUILTIN_MUL_OVERFLOW -/* Work around GCC bug 91450. */ +/* Work around GCC bug 91450 (fixed in GCC 9.3). */ # define INT_MULTIPLY_WRAPV(a, b, r) \ - ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) && EXPR_SIGNED (b) \ + ((! (9 < __GNUC__ + (3 <= __GNUC_MINOR__)) \ + && !_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) && EXPR_SIGNED (b) \ && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \ ? ((void) __builtin_mul_overflow (a, b, r), 1) \ : __builtin_mul_overflow (a, b, r)) |