diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-09 10:35:12 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-13 13:06:15 +0100 |
commit | 04f6073da2eb9af1d0728aa688c906b682a44801 (patch) | |
tree | f7175ee2647f90736527d71967944cbb6acbf220 /src/corelib/global | |
parent | caab0ad35799df3b2059bd3707b727dc0b5671aa (diff) |
ICC compile-fix for __builtin_add_overflow()'s parameter type
Based on Glen Johnson's patch, but rearranged to avoid repetition.
Fixes: QTBUG-81248
Change-Id: I9c23ab233ebd5514bc05fd155999597ada7295ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qnumeric_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h index fdfcbda6ca..7418579fe0 100644 --- a/src/corelib/global/qnumeric_p.h +++ b/src/corelib/global/qnumeric_p.h @@ -249,7 +249,8 @@ QT_WARNING_POP // size_t. Implementations for 8- and 16-bit types will work but may not be as // efficient. Implementations for 64-bit may be missing on 32-bit platforms. -#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) || (defined(Q_CC_INTEL) && !defined(Q_OS_WIN))) || __has_builtin(__builtin_add_overflow) +#if ((defined(Q_CC_INTEL) ? (Q_CC_INTEL >= 1800 && !defined(Q_OS_WIN)) : defined(Q_CC_GNU)) \ + && Q_CC_GNU >= 500) || __has_builtin(__builtin_add_overflow) // GCC 5, ICC 18, and Clang 3.8 have builtins to detect overflows template <typename T> inline |