[glib] Fall back for overflow-checked arithmetic with Intel compiler
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fall back for overflow-checked arithmetic with Intel compiler
- Date: Sat, 23 Jul 2016 13:29:01 +0000 (UTC)
commit a5f209bc656177a25586c461631fc5ea5459449f
Author: Thiago Macieira <thiago macieira intel com>
Date: Fri Jul 22 21:18:08 2016 -0700
Fall back for overflow-checked arithmetic with Intel compiler
The Intel compiler does not have intrinsics like `__builtin_uadd_overflow`.
https://bugzilla.gnome.org/show_bug.cgi?id=769104
glib/gtypes.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/glib/gtypes.h b/glib/gtypes.h
index c20217b..18ac6d1 100644
--- a/glib/gtypes.h
+++ b/glib/gtypes.h
@@ -381,7 +381,8 @@ typedef const gchar * (*GTranslateFunc) (const gchar *str,
/* Overflow-checked unsigned integer arithmetic
*/
#ifndef _GLIB_TEST_OVERFLOW_FALLBACK
-#if __GNUC__ >= 5
+/* https://bugzilla.gnome.org/show_bug.cgi?id=769104 */
+#if __GNUC__ >= 5 && !defined(__INTEL_COMPILER)
#define _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS
#elif __has_builtin(__builtin_uadd_overflow)
#define _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]