From 2f10a6f04eb12db5d438c103431c0b35ae0a0ee2 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 13 Mar 2017 11:31:25 +0100 Subject: Suppress -Wfloat-equal when defining float16 equality operators Change-Id: Ie30fa13eb5f8eb44f0c9c21e9483c8aba40cec02 Reviewed-by: Marc Mutz --- src/corelib/global/qfloat16.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib/global/qfloat16.h') diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h index 8fd2f212af..651057f8e2 100644 --- a/src/corelib/global/qfloat16.h +++ b/src/corelib/global/qfloat16.h @@ -196,6 +196,10 @@ QF16_MAKE_ARITH_OP_INT(*) QF16_MAKE_ARITH_OP_INT(/) #undef QF16_MAKE_ARITH_OP_INT +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wfloat-equal") +QT_WARNING_DISABLE_GCC("-Wfloat-equal") + inline bool operator>(qfloat16 a, qfloat16 b) Q_DECL_NOTHROW { return static_cast(a) > static_cast(b); } inline bool operator<(qfloat16 a, qfloat16 b) Q_DECL_NOTHROW { return static_cast(a) < static_cast(b); } inline bool operator>=(qfloat16 a, qfloat16 b) Q_DECL_NOTHROW { return static_cast(a) >= static_cast(b); } @@ -230,6 +234,8 @@ QF16_MAKE_BOOL_OP_INT(==) QF16_MAKE_BOOL_OP_INT(!=) #undef QF16_MAKE_BOOL_OP_INT +QT_WARNING_POP + /*! \internal */ -- cgit v1.2.3