]> Savannah Git Hosting - gnulib.git/commitdiff
Revert macOS INT_MULTIPLY_WRAPV patch
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Aug 2019 01:04:03 +0000 (18:04 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Aug 2019 01:04:34 +0000 (18:04 -0700)
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.

ChangeLog
lib/intprops.h

index 49a0ea4f1c5f5eeaf03da46b4b5988b33fe7dbd7..2d065ac05a0ef74baa13afd08ea766fc128a7fb4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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>
 
        libtool-next-version: Fix error output.
index 2cb6ada51b4419015eb39a210fbd26500b5beff8..ffd737028482246f0ffda34b0b3e5774e50435ba 100644 (file)
@@ -31,7 +31,6 @@
 # else
 #  define _GL_HAS___builtin_add_overflow 0
 # endif
-# define _GL_HAS___builtin_mul_overflow _GL_HAS___builtin_add_overflow
 # define _GL_TEMPDEF___has_builtin
 #endif
 
 # define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
 #endif
 
-/* 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
 
 /* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
 #ifdef _GL_TEMPDEF___has_builtin
 # undef __has_builtin
 # undef _GL_HAS___builtin_add_overflow
-# undef _GL_HAS___builtin_mul_overflow
 # undef _GL_TEMPDEF___has_builtin
 #endif