Discussion:
[PATCH] xalloc-oversized: port to icc
Paul Eggert
2017-06-25 06:49:15 UTC
Permalink
* 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 <***@cs.ucla.edu>
+
+ 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 <***@clisp.org>

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
Loading...