mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
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
This commit is contained in:
parent
df457c9110
commit
a5f209bc65
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user