summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-04-01 18:37:36 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-04-02 17:40:29 +0000
commit392294936ed14ee75b3d1cdae559bd41bbf63ef2 (patch)
tree28c203fc1160e5f387cbcd98411c7ff8de430977 /src/corelib/global
parent8241d51f7049d48912ce25fbd49ef4d22c58e340 (diff)
qfloat16: suppress warning caused by Clang macro we used
Clang implements the _cvtss_sh intrinsic by way of a macro, which uses a C99 extension and that's not allowed in C++ mode: float16.h:119:11: error: compound literals are a C99-specific feature [-Werror,-Wc99-extensions] /usr/bin/../lib64/clang/3.9.1/include/f16cintrin.h:76:55: note: expanded from macro '_cvtss_sh' Reported at https://bugs.llvm.org/show_bug.cgi?id=32491. Change-Id: I27b55fdf514247549455fffd14b170df75dd4e1f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qfloat16.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
index 651057f8e2..0fa83db93f 100644
--- a/src/corelib/global/qfloat16.h
+++ b/src/corelib/global/qfloat16.h
@@ -113,6 +113,8 @@ inline Q_REQUIRED_RESULT bool qIsNull(qfloat16 f) Q_DECL_NOTHROW
inline int qIntCast(qfloat16 f) Q_DECL_NOTHROW
{ return int(static_cast<float>(f)); }
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_CLANG("-Wc99-extensions")
inline qfloat16::qfloat16(float f) Q_DECL_NOTHROW
{
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__F16C__)
@@ -127,6 +129,7 @@ inline qfloat16::qfloat16(float f) Q_DECL_NOTHROW
+ ((u & 0x007fffff) >> shifttable[(u >> 23) & 0x1ff]);
#endif
}
+QT_WARNING_POP
inline qfloat16::operator float() const Q_DECL_NOTHROW
{