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>
This commit is contained in:
Thiago Macieira 2022-05-02 09:47:15 -07:00
parent 5302857f5a
commit 20104bb237
22 changed files with 37 additions and 208 deletions

View File

@ -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))

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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')

View File

@ -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;"

View File

@ -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

View File

@ -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

View File

@ -6275,7 +6275,7 @@ void qt_memfill64(quint64 *dest, quint64 color, qsizetype count)
}
#endif
#if defined(QT_COMPILER_SUPPORTS_SSSE3) && defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG)
#if defined(QT_COMPILER_SUPPORTS_SSSE3) && defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
__attribute__((optimize("no-tree-vectorize")))
#endif
void qt_memfill24(quint24 *dest, quint24 color, qsizetype count)

View File

@ -359,7 +359,7 @@ void Q_DECL_VECTORCALL qt_memfillXX_avx2(uchar *dest, __m256i value256, qsizetyp
void qt_memfill64_avx2(quint64 *dest, quint64 value, qsizetype count)
{
#if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
#if defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
// work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80820
__m128i value64 = _mm_set_epi64x(0, value); // _mm_cvtsi64_si128(value);
# ifdef Q_PROCESSOR_X86_64

View File

@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE
#if defined(Q_CC_GNU)
# define Q_DECL_RESTRICT __restrict__
# if defined(Q_PROCESSOR_X86_32) && defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
# if defined(Q_PROCESSOR_X86_32) && defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
# define Q_DECL_VECTORCALL __attribute__((sseregparm,regparm(3)))
# else
# define Q_DECL_VECTORCALL

View File

@ -213,13 +213,7 @@ void tst_qfloat16::qNaN()
QVERIFY(qIsNaN(nan));
QVERIFY(qIsNaN(nan + one));
QVERIFY(qIsNaN(-nan));
#ifdef Q_CC_INTEL
QEXPECT_FAIL("", "ICC optimizes zero * anything to zero", Continue);
#endif
QVERIFY(qIsNaN(nan * zero));
#ifdef Q_CC_INTEL
QEXPECT_FAIL("", "ICC optimizes zero * anything to zero", Continue);
#endif
QVERIFY(qIsNaN(Bounds::infinity() * zero));
QVERIFY(!nan.isNormal());

View File

@ -7064,7 +7064,7 @@ void tst_QObject::checkArgumentsForNarrowing()
{
// Clang and ICC masquerade as GCC, so introduce a more strict define
// for exactly GCC (to exclude/include it from some tests).
#if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
#if defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
#define Q_CC_EXACTLY_GCC Q_CC_GNU
#endif

View File

@ -270,10 +270,10 @@ void tst_QByteArrayView::constExpr() const
static_assert(!bv2.empty());
static_assert(bv2.size() == 5);
}
#if !defined(Q_CC_GNU) || defined(Q_CC_CLANG) || defined(Q_CC_INTEL)
#if !defined(Q_CC_GNU) || defined(Q_CC_CLANG)
// Below checks are disabled because of a compilation issue with GCC and
// -fsanitize=undefined. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962.
// Note: Q_CC_GNU is also defined for Clang and ICC, so we need to check those too.
// Note: Q_CC_GNU is also defined for Clang, so we need to check that too.
{
static constexpr char hello[] = "Hello";
constexpr QByteArrayView bv(hello);

View File

@ -1403,9 +1403,7 @@ void tst_QAccessibility::tabWidgetTest()
QAccessibleInterface* stackChild1Interface = stackWidgetInterface->child(0);
QVERIFY(stackChild1Interface);
#ifndef Q_CC_INTEL
QCOMPARE(stackChild1Interface->childCount(), 0);
#endif
QCOMPARE(stackChild1Interface->role(), QAccessible::StaticText);
QCOMPARE(stackChild1Interface->text(QAccessible::Name), QLatin1String("Page 1"));
QCOMPARE(label1, stackChild1Interface->object());
@ -1413,9 +1411,7 @@ void tst_QAccessibility::tabWidgetTest()
// Navigation in stack widgets should be consistent
QAccessibleInterface* parent = stackChild1Interface->parent();
QVERIFY(parent);
#ifndef Q_CC_INTEL
QCOMPARE(parent->childCount(), 2);
#endif
QCOMPARE(parent->role(), QAccessible::LayeredPane);
QAccessibleInterface* stackChild2Interface = stackWidgetInterface->child(1);
@ -1427,9 +1423,7 @@ void tst_QAccessibility::tabWidgetTest()
parent = stackChild2Interface->parent();
QVERIFY(parent);
#ifndef Q_CC_INTEL
QCOMPARE(parent->childCount(), 2);
#endif
QCOMPARE(parent->role(), QAccessible::LayeredPane);
QTestAccessibility::clearEvents();

View File

@ -678,7 +678,7 @@ bool TestLogger::shouldIgnoreTest(const QString &test) const
return true;
#endif
#if defined(QT_NO_EXCEPTIONS) || defined(Q_CC_INTEL) || defined(Q_OS_WIN)
#if defined(QT_NO_EXCEPTIONS) || defined(Q_OS_WIN)
// Disable this test on Windows or for Intel compiler, as the run-times
// will popup dialogs with warnings that uncaught exceptions were thrown
if (test == "exceptionthrow")

View File

@ -109,7 +109,7 @@ void tst_QSizePolicy::constExpr()
{
/* gcc < 4.8.0 has problems with init'ing variant members in constexpr ctors */
/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54922 */
#if !defined(Q_CC_GNU) || defined(Q_CC_INTEL) || defined(Q_CC_CLANG) || Q_CC_GNU >= 408
#if !defined(Q_CC_GNU) || defined(Q_CC_CLANG) || Q_CC_GNU >= 408
// check that certain ctors are constexpr (compile-only):
{ constexpr QSizePolicy sp; Q_UNUSED(sp); }
{ constexpr QSizePolicy sp = QSizePolicy(); Q_UNUSED(sp); }

View File

@ -984,7 +984,7 @@ void tst_QStyleSheetStyle::focusColors()
// ten pixels of the right color requires quite a many characters, as the
// majority of the pixels will have slightly different colors due to the
// anti-aliasing effect.
#if !defined(Q_OS_WIN32) && !(defined(Q_OS_LINUX) && defined(Q_CC_GNU) && !defined(Q_CC_INTEL))
#if !defined(Q_OS_WIN32) && !(defined(Q_OS_LINUX) && defined(Q_CC_GNU))
QSKIP("This is a fragile test which fails on many esoteric platforms because of focus problems"
" (for example, QTBUG-33959)."
"That doesn't mean that the feature doesn't work in practice.");