From 36cd85acbe13623808228652dd75aca902cef05e Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Fri, 10 Jun 2016 19:32:33 +0100 Subject: [PATCH] Suppress warnings about double promotions --- projects/SelfTest/ApproxTests.cpp | 9 +++++++++ projects/SelfTest/ConditionTests.cpp | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/projects/SelfTest/ApproxTests.cpp b/projects/SelfTest/ApproxTests.cpp index 53656596..7156c4c5 100644 --- a/projects/SelfTest/ApproxTests.cpp +++ b/projects/SelfTest/ApproxTests.cpp @@ -8,6 +8,15 @@ #include "catch.hpp" +#ifdef __clang__ +# ifdef __ICC // icpc defines the __clang__ macro +# else // __ICC +# pragma clang diagnostic ignored "-Wdouble-promotion" +# endif +#endif + + + /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( diff --git a/projects/SelfTest/ConditionTests.cpp b/projects/SelfTest/ConditionTests.cpp index b1d29106..b3cda90a 100644 --- a/projects/SelfTest/ConditionTests.cpp +++ b/projects/SelfTest/ConditionTests.cpp @@ -15,6 +15,13 @@ #include #include +#ifdef __clang__ +# ifdef __ICC // icpc defines the __clang__ macro +# else // __ICC +# pragma clang diagnostic ignored "-Wdouble-promotion" +# endif +#endif + struct TestData { TestData() : int_seven( 7 ),