From 69184952c01ce81b18d5edd15f4c4794bc15d77b Mon Sep 17 00:00:00 2001 From: Guilherme Amadio <amadio@cern.ch> Date: Wed, 30 Aug 2017 10:20:36 +0200 Subject: [PATCH] Supress Vc warnings when using Clang compiler Suppressing -Wall is not enough to avoid -Wconditional-uninitialized warnings from Vc with Clang, so we need to suppress this one explicitly. --- math/mathcore/inc/Math/Types.h | 10 ++++++++++ test/testVc.cxx | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/math/mathcore/inc/Math/Types.h b/math/mathcore/inc/Math/Types.h index b181884f0df..53826bd2af8 100644 --- a/math/mathcore/inc/Math/Types.h +++ b/math/mathcore/inc/Math/Types.h @@ -6,6 +6,12 @@ #ifdef R__HAS_VECCORE #if defined(R__HAS_VC) + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wconditional-uninitialized" +#endif + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wall" #pragma GCC diagnostic ignored "-Wunused-parameter" @@ -13,6 +19,10 @@ #pragma GCC diagnostic pop #endif +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #include <VecCore/VecCore> namespace ROOT { diff --git a/test/testVc.cxx b/test/testVc.cxx index 1ae553dd7f4..3b8886a7640 100644 --- a/test/testVc.cxx +++ b/test/testVc.cxx @@ -21,6 +21,11 @@ */ +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wconditional-uninitialized" +#endif + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wall" #pragma GCC diagnostic ignored "-Wunused-parameter" @@ -28,6 +33,10 @@ #include <Vc/IO> #pragma GCC diagnostic pop +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #include <iostream> #include <iomanip> -- GitLab