summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-05-02 09:47:15 -0700
committerThiago Macieira <thiago.macieira@intel.com>2022-05-11 12:50:08 -0700
commit20104bb237d5231640649bcc610d4e51e03ea617 (patch)
treec9587548c0ed9fa201556a9beaa00fb2370f753c /src/corelib
parent5302857f5a716037aaef22143ea11102ad47bce0 (diff)
Remove remnants of the old Intel C++ compiler
We don't support it any more. I don't think it has ever properly compiled Qt 6 (and it's no longer working for me against GCC 12's libstdc++ headers). If you report a bug against it, Intel support's first question is if you can try instead the new Clang/LLVM-based oneAPI C++ compiler. So we support only that one, which identifies itself as Q_CC_CLANG. Change-Id: I5ff8e16fcdcb4ffd9ab6fffd16eb57a092c8439e Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qcompilerdetection.h138
-rw-r--r--src/corelib/global/qglobal.cpp10
-rw-r--r--src/corelib/global/qglobal.h2
-rw-r--r--src/corelib/global/qlibraryinfo.cpp32
-rw-r--r--src/corelib/global/qnumeric.h6
-rw-r--r--src/corelib/global/qnumeric_p.h2
-rw-r--r--src/corelib/global/qsimd_p.h6
-rw-r--r--src/corelib/kernel/qtmetamacros.h11
-rw-r--r--src/corelib/text/qanystringview.h2
-rw-r--r--src/corelib/text/qstring.cpp2
-rw-r--r--src/corelib/text/qstringview.h2
-rw-r--r--src/corelib/tools/qalgorithms.h2
12 files changed, 28 insertions, 187 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index f7989da8be..7a03bcf9fd 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
+** Copyright (C) 2022 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -105,15 +105,10 @@
# define Q_DECL_IMPORT __declspec(dllimport)
# define QT_MAKE_UNCHECKED_ARRAY_ITERATOR(x) stdext::make_unchecked_array_iterator(x) // Since _MSC_VER >= 1800
# define QT_MAKE_CHECKED_ARRAY_ITERATOR(x, N) stdext::make_checked_array_iterator(x, size_t(N)) // Since _MSC_VER >= 1500
-/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
-# if defined(__INTEL_COMPILER)
# undef Q_CC_MSVC_ONLY
# ifdef Q_CC_CLANG_ONLY
# undef Q_CC_CLANG_ONLY
# endif
-# define Q_DECL_VARIABLE_DEPRECATED
-# define Q_CC_INTEL __INTEL_COMPILER
-# endif
#elif defined(__BORLANDC__) || defined(__TURBOC__)
# define Q_CC_BOR
@@ -148,19 +143,7 @@
# if defined(__MINGW32__)
# define Q_CC_MINGW
# endif
-# if defined(__INTEL_COMPILER)
-/* Intel C++ also masquerades as GCC */
-# define Q_CC_INTEL (__INTEL_COMPILER)
-# ifdef __clang__
-/* Intel C++ masquerades as Clang masquerading as GCC */
-# define Q_CC_CLANG 305
-# endif
-# define Q_ASSUME_IMPL(expr) __assume(expr)
-# define Q_UNREACHABLE_IMPL() __builtin_unreachable()
-# if __INTEL_COMPILER >= 1300 && !defined(__APPLE__)
-# define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
-# endif
-# elif defined(__clang__)
+# if defined(__clang__)
/* Clang also masquerades as GCC */
# if defined(__apple_build_version__)
// The Clang version reported by Apple Clang in __clang_major__
@@ -349,10 +332,6 @@
# elif defined(__KCC)
# define Q_CC_KAI
-/* Using the `using' keyword avoids Intel C++ for Linux warnings */
-# elif defined(__INTEL_COMPILER)
-# define Q_CC_INTEL (__INTEL_COMPILER)
-
/* Uses CFront, make sure to read the manual how to tweak templates. */
# elif defined(__ghs)
# define Q_CC_GHS
@@ -565,82 +544,7 @@
# endif
#endif
-#if defined(Q_CC_INTEL) && !defined(Q_CC_MSVC)
-# define Q_COMPILER_RESTRICTED_VLA
-# define Q_COMPILER_VARIADIC_MACROS // C++11 feature supported as an extension in other modes, too
-# if __INTEL_COMPILER < 1200
-# define Q_NO_TEMPLATE_FRIENDS
-# endif
-# if __INTEL_COMPILER >= 1310 && !defined(_WIN32)
-// ICC supports C++14 binary literals in C, C++98, and C++11 modes
-// at least since 13.1, but I can't test further back
-# define Q_COMPILER_BINARY_LITERALS
-# endif
-# if __cplusplus >= 201103L || defined(__INTEL_CXX11_MODE__)
-# if __INTEL_COMPILER >= 1200
-# define Q_COMPILER_AUTO_TYPE
-# define Q_COMPILER_CLASS_ENUM
-# define Q_COMPILER_DECLTYPE
-# define Q_COMPILER_DEFAULT_MEMBERS
-# define Q_COMPILER_DELETE_MEMBERS
-# define Q_COMPILER_EXTERN_TEMPLATES
-# define Q_COMPILER_LAMBDA
-# define Q_COMPILER_RVALUE_REFS
-# define Q_COMPILER_STATIC_ASSERT
-# define Q_COMPILER_VARIADIC_MACROS
-# endif
-# if __INTEL_COMPILER >= 1210
-# define Q_COMPILER_ATTRIBUTES
-# define Q_COMPILER_AUTO_FUNCTION
-# define Q_COMPILER_NULLPTR
-# define Q_COMPILER_TEMPLATE_ALIAS
-# ifndef _CHAR16T // MSVC headers
-# define Q_COMPILER_UNICODE_STRINGS
-# endif
-# define Q_COMPILER_VARIADIC_TEMPLATES
-# endif
-# if __INTEL_COMPILER >= 1300
-# define Q_COMPILER_ATOMICS
-// constexpr support is only partial
-//# define Q_COMPILER_CONSTEXPR
-# define Q_COMPILER_INITIALIZER_LISTS
-# define Q_COMPILER_UNIFORM_INIT
-# define Q_COMPILER_NOEXCEPT
-# endif
-# if __INTEL_COMPILER >= 1400
-// causes issues with QArrayData and QtPrivate::RefCount - Intel issue ID 6000056211, bug DPD200534796
-//# define Q_COMPILER_CONSTEXPR
-# define Q_COMPILER_DELEGATING_CONSTRUCTORS
-# define Q_COMPILER_EXPLICIT_CONVERSIONS
-# define Q_COMPILER_EXPLICIT_OVERRIDES
-# define Q_COMPILER_NONSTATIC_MEMBER_INIT
-# define Q_COMPILER_RANGE_FOR
-# define Q_COMPILER_RAW_STRINGS
-# define Q_COMPILER_REF_QUALIFIERS
-# define Q_COMPILER_UNICODE_STRINGS
-# define Q_COMPILER_UNRESTRICTED_UNIONS
-# endif
-# if __INTEL_COMPILER >= 1500
-# if __INTEL_COMPILER * 100 + __INTEL_COMPILER_UPDATE >= 150001
-// the bug mentioned above is fixed in 15.0.1
-# define Q_COMPILER_CONSTEXPR
-# endif
-# define Q_COMPILER_ALIGNAS
-# define Q_COMPILER_ALIGNOF
-# define Q_COMPILER_INHERITING_CONSTRUCTORS
-# define Q_COMPILER_THREAD_LOCAL
-# define Q_COMPILER_UDL
-# endif
-# elif defined(__STDC_VERSION__) && __STDC_VERSION__ > 199901L
-// C11 features supported. Only tested with ICC 17 and up.
-# define Q_COMPILER_STATIC_ASSERT
-# if __has_include(<threads.h>)
-# define Q_COMPILER_THREAD_LOCAL
-# endif
-# endif
-#endif
-
-#if defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
+#if defined(Q_CC_CLANG)
/* General C++ features */
# define Q_COMPILER_RESTRICTED_VLA
# if __has_feature(attribute_deprecated_with_message)
@@ -803,7 +707,7 @@
# define Q_DECL_UNUSED __attribute__((__unused__))
# endif
# define Q_DECL_UNUSED_MEMBER Q_DECL_UNUSED
-#endif // defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
+#endif // defined(Q_CC_CLANG)
#if defined(Q_CC_GNU_ONLY)
# define Q_COMPILER_RESTRICTED_VLA
@@ -1010,7 +914,7 @@
# endif // !_HAS_CONSTEXPR
# endif // !__GLIBCXX__ && !_LIBCPP_VERSION
# endif // Q_OS_QNX
-# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \
+# if defined(Q_CC_CLANG) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \
&& ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402)
// Apple has not updated libstdc++ since 2007, which means it does not have
// <initializer_list> or std::move. Let's disable these features
@@ -1020,13 +924,6 @@
// Also disable <atomic>, since it's clearly not there
# undef Q_COMPILER_ATOMICS
# endif
-# if defined(Q_CC_CLANG) && defined(Q_CC_INTEL) && Q_CC_INTEL >= 1500
-// ICC 15.x and 16.0 have their own implementation of std::atomic, which is activated when in Clang mode
-// (probably because libc++'s <atomic> on OS X failed to compile), but they're missing some
-// critical definitions. (Reported as Intel Issue ID 6000117277)
-# define __USE_CONSTEXPR 1
-# define __USE_NOEXCEPT 1
-# endif
#endif
/*
@@ -1240,30 +1137,7 @@
*/
#define QT_DO_PRAGMA(text) _Pragma(#text)
-#if defined(Q_CC_INTEL) && defined(Q_CC_MSVC)
-/* icl.exe: Intel compiler on Windows */
-# undef QT_DO_PRAGMA /* not needed */
-# define QT_WARNING_PUSH __pragma(warning(push))
-# define QT_WARNING_POP __pragma(warning(pop))
-# define QT_WARNING_DISABLE_MSVC(number)
-# define QT_WARNING_DISABLE_INTEL(number) __pragma(warning(disable: number))
-# define QT_WARNING_DISABLE_CLANG(text)
-# define QT_WARNING_DISABLE_GCC(text)
-# define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_INTEL(1478 1786)
-# define QT_WARNING_DISABLE_FLOAT_COMPARE QT_WARNING_DISABLE_INTEL(1572)
-# define QT_WARNING_DISABLE_INVALID_OFFSETOF
-#elif defined(Q_CC_INTEL)
-/* icc: Intel compiler on Linux or OS X */
-# define QT_WARNING_PUSH QT_DO_PRAGMA(warning(push))
-# define QT_WARNING_POP QT_DO_PRAGMA(warning(pop))
-# define QT_WARNING_DISABLE_INTEL(number) QT_DO_PRAGMA(warning(disable: number))
-# define QT_WARNING_DISABLE_MSVC(number)
-# define QT_WARNING_DISABLE_CLANG(text)
-# define QT_WARNING_DISABLE_GCC(text)
-# define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_INTEL(1478 1786)
-# define QT_WARNING_DISABLE_FLOAT_COMPARE QT_WARNING_DISABLE_INTEL(1572)
-# define QT_WARNING_DISABLE_INVALID_OFFSETOF
-#elif defined(Q_CC_MSVC) && !defined(Q_CC_CLANG)
+#if defined(Q_CC_MSVC) && !defined(Q_CC_CLANG)
# undef QT_DO_PRAGMA /* not needed */
# define QT_WARNING_PUSH __pragma(warning(push))
# define QT_WARNING_POP __pragma(warning(pop))
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index e184954cb2..1f9ac131d4 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1728,9 +1728,13 @@ bool qSharedBuild() noexcept
/*!
\macro Q_CC_INTEL
\relates <QtGlobal>
+ \obsolete
- Defined if the application is compiled using Intel C++ for Linux,
- Intel C++ for Windows.
+ This macro used to be defined if the application was compiled with the old
+ Intel C++ compiler for Linux, macOS or Windows. The new oneAPI C++ compiler
+ is just a build of Clang and therefore does not define this macro.
+
+ \sa Q_CC_CLANG
*/
/*!
@@ -3382,7 +3386,7 @@ void qAbort()
// [support.start.term]). So we bypass std::abort() and directly
// terminate the application.
-# if defined(Q_CC_MSVC) && !defined(Q_CC_INTEL)
+# if defined(Q_CC_MSVC)
if (IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE))
__fastfail(FAST_FAIL_FATAL_APP_EXIT);
# else
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 82a33939dc..998cf7d2a1 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -840,7 +840,7 @@ inline void qt_noop(void) {}
#if !defined(QT_NO_EXCEPTIONS)
# if !defined(Q_MOC_RUN)
-# if (defined(Q_CC_CLANG) && !defined(Q_CC_INTEL) && !__has_feature(cxx_exceptions)) || \
+# if (defined(Q_CC_CLANG) && !__has_feature(cxx_exceptions)) || \
(defined(Q_CC_GNU) && !defined(__EXCEPTIONS))
# define QT_NO_EXCEPTIONS
# endif
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index b3ea6f8756..353d4bdf95 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -207,37 +207,7 @@ static bool havePaths() {
QLibraryInfo::QLibraryInfo()
{ }
-#if defined(Q_CC_INTEL) // must be before GNU, Clang and MSVC because ICC/ICL claim to be them
-# ifdef __INTEL_CLANG_COMPILER
-# define ICC_COMPAT "Clang"
-# elif defined(__INTEL_MS_COMPAT_LEVEL)
-# define ICC_COMPAT "Microsoft"
-# elif defined(__GNUC__)
-# define ICC_COMPAT "GCC"
-# else
-# define ICC_COMPAT "no"
-# endif
-# if __INTEL_COMPILER == 1300
-# define ICC_VERSION "13.0"
-# elif __INTEL_COMPILER == 1310
-# define ICC_VERSION "13.1"
-# elif __INTEL_COMPILER == 1400
-# define ICC_VERSION "14.0"
-# elif __INTEL_COMPILER == 1500
-# define ICC_VERSION "15.0"
-# else
-# define ICC_VERSION QT_STRINGIFY(__INTEL_COMPILER)
-# endif
-# ifdef __INTEL_COMPILER_UPDATE
-# define COMPILER_STRING "Intel(R) C++ " ICC_VERSION "." QT_STRINGIFY(__INTEL_COMPILER_UPDATE) \
- " build " QT_STRINGIFY(__INTEL_COMPILER_BUILD_DATE) " [" \
- ICC_COMPAT " compatibility]"
-# else
-# define COMPILER_STRING "Intel(R) C++ " ICC_VERSION \
- " build " QT_STRINGIFY(__INTEL_COMPILER_BUILD_DATE) " [" \
- ICC_COMPAT " compatibility]"
-# endif
-#elif defined(Q_CC_CLANG) // must be before GNU, because clang claims to be GNU too
+#if defined(Q_CC_CLANG) // must be before GNU, because clang claims to be GNU too
# ifdef __apple_build_version__ // Apple clang has other version numbers
# define COMPILER_STRING "Clang " __clang_version__ " (Apple)"
# else
diff --git a/src/corelib/global/qnumeric.h b/src/corelib/global/qnumeric.h
index a40c95b637..d625b11a50 100644
--- a/src/corelib/global/qnumeric.h
+++ b/src/corelib/global/qnumeric.h
@@ -114,11 +114,9 @@ Q_CORE_EXPORT quint64 qFloatDistance(double a, double b);
// 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_INTEL) ? (Q_CC_INTEL >= 1800 && !defined(Q_OS_WIN)) : defined(Q_CC_GNU)) \
- && Q_CC_GNU >= 500) \
- || __has_builtin(__builtin_add_overflow)) \
+#if (Q_CC_GNU >= 500 || __has_builtin(__builtin_add_overflow)) \
&& !(QT_POINTER_SIZE == 4 && defined(Q_CC_CLANG))
-// GCC 5, ICC 18, and Clang 3.8 have builtins to detect overflows
+// GCC 5 and Clang 3.8 have builtins to detect overflows
// 32 bit Clang has the builtins but tries to link a library which hasn't
#define Q_INTRINSIC_MUL_OVERFLOW64
diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h
index f224f9848c..7e73439a10 100644
--- a/src/corelib/global/qnumeric_p.h
+++ b/src/corelib/global/qnumeric_p.h
@@ -59,7 +59,7 @@
#include <limits>
#include <type_traits>
-#if !defined(Q_CC_MSVC) && (defined(Q_OS_QNX) || defined(Q_CC_INTEL))
+#if !defined(Q_CC_MSVC) && defined(Q_OS_QNX)
# include <math.h>
# ifdef isnan
# define QT_MATH_H_DEFINES_MACROS
diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h
index 153eebf2b3..19119749d7 100644
--- a/src/corelib/global/qsimd_p.h
+++ b/src/corelib/global/qsimd_p.h
@@ -185,7 +185,7 @@ QT_WARNING_DISABLE_INTEL(103)
# else
# define QT_COMPILER_SUPPORTS_HERE(x) ((__ ## x ## __) || QT_COMPILER_SUPPORTS(x))
# endif
-# if defined(Q_CC_GNU) && !defined(Q_CC_INTEL)
+# if defined(Q_CC_GNU)
/* GCC requires attributes for a function */
# define QT_FUNCTION_TARGET(x) __attribute__((__target__(QT_FUNCTION_TARGET_STRING_ ## x)))
# else
@@ -204,7 +204,7 @@ QT_WARNING_DISABLE_INTEL(103)
# define __SSE__ 1
# endif
-# if defined(Q_OS_WIN) && defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG)
+# if defined(Q_OS_WIN) && defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
// 64-bit GCC on Windows does not support AVX, so we hack around it by forcing
// it to emit unaligned loads & stores
// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49001
@@ -227,7 +227,7 @@ asm(
);
# endif
-# if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_OS_WASM)
+# if defined(Q_CC_GNU) && !defined(Q_OS_WASM)
// GCC 4.4 and Clang 2.8 added a few more intrinsics there
# include <x86intrin.h>
# endif
diff --git a/src/corelib/kernel/qtmetamacros.h b/src/corelib/kernel/qtmetamacros.h
index 89f51e97b6..eca08fbec0 100644
--- a/src/corelib/kernel/qtmetamacros.h
+++ b/src/corelib/kernel/qtmetamacros.h
@@ -129,12 +129,7 @@ QT_BEGIN_NAMESPACE
#define QT_TR_FUNCTIONS
#endif
-#if defined(Q_CC_INTEL)
-// Cannot redefine the visibility of a method in an exported class
-# define Q_DECL_HIDDEN_STATIC_METACALL
-#else
-# define Q_DECL_HIDDEN_STATIC_METACALL Q_DECL_HIDDEN
-#endif
+#define Q_DECL_HIDDEN_STATIC_METACALL Q_DECL_HIDDEN
#if defined(Q_CC_CLANG)
# if Q_CC_CLANG >= 1100
@@ -142,13 +137,13 @@ QT_BEGIN_NAMESPACE
# elif Q_CC_CLANG >= 306
# define Q_OBJECT_NO_OVERRIDE_WARNING QT_WARNING_DISABLE_CLANG("-Winconsistent-missing-override")
# endif
-#elif defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && Q_CC_GNU >= 501
+#elif defined(Q_CC_GNU) && Q_CC_GNU >= 501
# define Q_OBJECT_NO_OVERRIDE_WARNING QT_WARNING_DISABLE_GCC("-Wsuggest-override")
#else
# define Q_OBJECT_NO_OVERRIDE_WARNING
#endif
-#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && Q_CC_GNU >= 600
+#if defined(Q_CC_GNU) && Q_CC_GNU >= 600
# define Q_OBJECT_NO_ATTRIBUTES_WARNING QT_WARNING_DISABLE_GCC("-Wattributes")
#else
# define Q_OBJECT_NO_ATTRIBUTES_WARNING
diff --git a/src/corelib/text/qanystringview.h b/src/corelib/text/qanystringview.h
index 102a5b63ae..65b74c4664 100644
--- a/src/corelib/text/qanystringview.h
+++ b/src/corelib/text/qanystringview.h
@@ -123,7 +123,7 @@ private:
template <typename Char>
static qsizetype lengthHelperPointer(const Char *str) noexcept
{
-#if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
+#if defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
if (__builtin_constant_p(*str)) {
qsizetype result = 0;
while (*str++ != u'\0')
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index acf02832da..00e12fe35d 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -360,7 +360,7 @@ extern "C" void qt_fromlatin1_mips_asm_unroll8 (char16_t*, const char*, uint);
extern "C" void qt_toLatin1_mips_dsp_asm(uchar *dst, const char16_t *src, int length);
#endif
-#if defined(__SSE2__) && defined(Q_CC_GNU) && !defined(Q_CC_INTEL)
+#if defined(__SSE2__) && defined(Q_CC_GNU)
# if defined(__SANITIZE_ADDRESS__) && Q_CC_GNU < 800 && !defined(Q_CC_CLANG)
# warning "The __attribute__ on below will likely cause a build failure with your GCC version. Your choices are:"
# warning "1) disable ASan;"
diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h
index 194a8280c9..3c1f852c27 100644
--- a/src/corelib/text/qstringview.h
+++ b/src/corelib/text/qstringview.h
@@ -154,7 +154,7 @@ private:
#if defined(__cpp_lib_is_constant_evaluated)
if (std::is_constant_evaluated())
return std::char_traits<Char>::length(str);
-#elif defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
+#elif defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
if (__builtin_constant_p(*str))
return std::char_traits<Char>::length(str);
#endif
diff --git a/src/corelib/tools/qalgorithms.h b/src/corelib/tools/qalgorithms.h
index a72215e8d6..86b91331d8 100644
--- a/src/corelib/tools/qalgorithms.h
+++ b/src/corelib/tools/qalgorithms.h
@@ -78,7 +78,7 @@ namespace QAlgorithmsPrivate {
# if (defined __apple_build_version__ && __clang_major__ >= 7) || (Q_CC_CLANG >= 307)
# define QT_HAS_CONSTEXPR_BUILTINS
# endif
-#elif defined(Q_CC_MSVC) && !defined(Q_CC_INTEL) && !defined(Q_PROCESSOR_ARM)
+#elif defined(Q_CC_MSVC) && !defined(Q_PROCESSOR_ARM)
# define QT_HAS_CONSTEXPR_BUILTINS
#elif defined(Q_CC_GNU)
# define QT_HAS_CONSTEXPR_BUILTINS