Discussion:
[PATCH] intprops: port to recent icc
(too old to reply)
Paul Eggert
2017-05-25 07:08:56 UTC
Permalink
Raw Message
Port to icc (ICC) 17.0.4 20170411, which defines __GNUC__ to be 5
but does not support __builtin_add_overflow etc.
* lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW) [__ICC]:
Define to 0.
---
ChangeLog | 8 ++++++++
lib/intprops.h | 6 +++++-
2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 39c08a4..3e78d5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-05-25 Paul Eggert <***@cs.ucla.edu>
+
+ intprops: port to recent icc
+ Port to icc (ICC) 17.0.4 20170411, which defines __GNUC__ to be 5
+ but does not support __builtin_add_overflow etc.
+ * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW) [__ICC]:
+ Define to 0.
+
2017-05-23 Karl Berry <***@freefriends.org>

* config/srclist.txt (iconv.m4): sync broken, comment out
diff --git a/lib/intprops.h b/lib/intprops.h
index d8c7120..33a7ec5 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -219,7 +219,11 @@
: (max) >> (b) < (a))

/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
-#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__)
+#if 5 <= __GNUC__ && !defined __ICC
+# define _GL_HAS_BUILTIN_OVERFLOW 1
+#else
+# define _GL_HAS_BUILTIN_OVERFLOW 0
+#endif

/* True if __builtin_add_overflow_p (A, B, C) works. */
#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
--
2.9.4
Loading...