bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] xalloc-oversized: port to icc


From: Paul Eggert
Subject: [PATCH] xalloc-oversized: port to icc
Date: Sat, 24 Jun 2017 23:49:15 -0700

* lib/xalloc-oversized.h (xalloc_oversized): Do not use
__builtin_mul_overflow if ICC is defined, as this results in
"undefined reference to `__builtin_mul_overflow'" with icc 17.0.2
20170213.
---
 ChangeLog              | 8 ++++++++
 lib/xalloc-oversized.h | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 14991f1..26875e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-06-24  Paul Eggert  <address@hidden>
+
+       xalloc-oversized: port to icc
+       * lib/xalloc-oversized.h (xalloc_oversized): Do not use
+       __builtin_mul_overflow if ICC is defined, as this results in
+       "undefined reference to `__builtin_mul_overflow'" with icc 17.0.2
+       20170213.
+
 2017-06-19  Bruno Haible  <address@hidden>
 
        classpath: Avoid including config.h twice, as it produces warnings.
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
index ff0efc6..2e09bab 100644
--- a/lib/xalloc-oversized.h
+++ b/lib/xalloc-oversized.h
@@ -44,7 +44,7 @@ typedef size_t __xalloc_count_type;
 #if 7 <= __GNUC__
 # define xalloc_oversized(n, s) \
    __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
-#elif 5 <= __GNUC__ && !__STRICT_ANSI__
+#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__
 # define xalloc_oversized(n, s) \
    (__builtin_constant_p (n) && __builtin_constant_p (s) \
     ? __xalloc_oversized (n, s) \
-- 
2.9.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]