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>
This commit is contained in:
parent
caab0ad357
commit
04f6073da2
@ -249,7 +249,8 @@ QT_WARNING_POP
|
|||||||
// size_t. Implementations for 8- and 16-bit types will work but may not be as
|
// 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.
|
// 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
|
// GCC 5, ICC 18, and Clang 3.8 have builtins to detect overflows
|
||||||
|
|
||||||
template <typename T> inline
|
template <typename T> inline
|
||||||
|
Loading…
Reference in New Issue
Block a user