summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/global/qglobal.cpp3
-rw-r--r--tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp7
2 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 0fed61d860..90fbae807e 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -160,8 +160,7 @@ static_assert(std::numeric_limits<float>::is_iec559,
// Technically, presence of NaN and infinities are implied from the above check,
// but double checking our environment doesn't hurt...
static_assert(std::numeric_limits<float>::has_infinity &&
- std::numeric_limits<float>::has_quiet_NaN &&
- std::numeric_limits<float>::has_signaling_NaN,
+ std::numeric_limits<float>::has_quiet_NaN,
"Qt assumes IEEE 754 floating point");
// is_iec559 checks for ISO/IEC/IEEE 60559:2011 (aka IEEE 754-2008) compliance,
diff --git a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp
index ae4c0d05a0..242255d026 100644
--- a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp
+++ b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp
@@ -550,16 +550,19 @@ void tst_qfloat16::properties()
// and the same supposed to be for qfloat16.
#if !defined(Q_CC_GHS)
QVERIFY(Bounds::is_iec559);
-#else
+#endif //Q_CC_GHS
+#if QT_CONFIG(signaling_nan)
// Technically, presence of NaN and infinities are implied from the above check, but that checkings GHS compiler complies.
QVERIFY(Bounds::has_infinity && Bounds::has_quiet_NaN && Bounds::has_signaling_NaN);
-#endif // Q_CC_GHS
+#endif
QVERIFY(Bounds::is_bounded);
QVERIFY(!Bounds::is_modulo);
QVERIFY(!Bounds::traps);
QVERIFY(Bounds::has_infinity);
QVERIFY(Bounds::has_quiet_NaN);
+#if QT_CONFIG(signaling_nan)
QVERIFY(Bounds::has_signaling_NaN);
+#endif
#if !defined(Q_CC_GHS)
QCOMPARE(Bounds::has_denorm, std::denorm_present);
#else