diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-08-27 18:04:03 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-08-27 18:04:34 -0700 |
commit | ec0624f9f988e86abf78d6ea0e4538f2acb060ce (patch) | |
tree | c76c20c070556959546fab46725675a7193408e2 | |
parent | 0c5031bcc46774b5f54253a71ce8f4ab31c18295 (diff) | |
download | gnulib-ec0624f9f988e86abf78d6ea0e4538f2acb060ce.tar.gz gnulib-ec0624f9f988e86abf78d6ea0e4538f2acb060ce.tar.bz2 |
Revert macOS INT_MULTIPLY_WRAPV patch
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2019-08/msg00076.html
* lib/intprops.h (_GL_HAS___builtin_mul_overflow): Remove.
(_GL_HAS_BUILTIN_MUL_OVERFLOW):
Go back to working around the Clang bug on macOS.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | lib/intprops.h | 13 |
2 files changed, 14 insertions, 8 deletions
@@ -1 +1,10 @@ +2019-08-27 Paul Eggert <eggert@cs.ucla.edu> + + Revert macOS INT_MULTIPLY_WRAPV patch + Problem reported by Bruno Haible in: + https://lists.gnu.org/r/bug-gnulib/2019-08/msg00076.html + * lib/intprops.h (_GL_HAS___builtin_mul_overflow): Remove. + (_GL_HAS_BUILTIN_MUL_OVERFLOW): + Go back to working around the Clang bug on macOS. + 2019-08-27 Bruno Haible <bruno@clisp.org> diff --git a/lib/intprops.h b/lib/intprops.h index 2cb6ada51b..ffd7370284 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -33,3 +33,2 @@ # endif -# define _GL_HAS___builtin_mul_overflow _GL_HAS___builtin_add_overflow # define _GL_TEMPDEF___has_builtin @@ -243,9 +242,8 @@ -/* True if __builtin_mul_overflow (A, B, P) works when P is non-null. - Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>. */ -#if (__has_builtin (__builtin_mul_overflow) \ - && (!defined __clang__ || (defined __APPLE__ && defined __MACH__))) -# define _GL_HAS_BUILTIN_MUL_OVERFLOW 1 -#else +/* True if __builtin_mul_overflow (A, B, P) works when P is non-null. */ +#ifdef __clang__ +/* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>. */ # define _GL_HAS_BUILTIN_MUL_OVERFLOW 0 +#else +# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW #endif @@ -593,3 +591,2 @@ # undef _GL_HAS___builtin_add_overflow -# undef _GL_HAS___builtin_mul_overflow # undef _GL_TEMPDEF___has_builtin |