From 492fe7ce02f69693a53a018024920c36911aa9a5 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 3 Feb 2016 12:51:19 -0800 Subject: [PATCH] Silenced some unhelpful warnings generated by nvcc. --- Eigen/src/Core/util/DisableStupidWarnings.h | 5 +++++ Eigen/src/Core/util/ReenableStupidWarnings.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/Eigen/src/Core/util/DisableStupidWarnings.h b/Eigen/src/Core/util/DisableStupidWarnings.h index 91c61fcf2..686a7c9ce 100755 --- a/Eigen/src/Core/util/DisableStupidWarnings.h +++ b/Eigen/src/Core/util/DisableStupidWarnings.h @@ -20,6 +20,7 @@ #pragma warning( push ) #endif #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4503 4512 4522 4700 4717 4800) + #elif defined __INTEL_COMPILER // 2196 - routine is both "inline" and "noinline" ("noinline" assumed) // ICC 12 generates this warning even without any inline keyword, when defining class methods 'inline' i.e. inside of class body @@ -32,6 +33,7 @@ #pragma warning push #endif #pragma warning disable 2196 279 1684 2259 + #elif defined __clang__ // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant // this is really a stupid warning as it warns on compile-time expressions involving enums @@ -39,6 +41,9 @@ #pragma clang diagnostic push #endif #pragma clang diagnostic ignored "-Wconstant-logical-operand" + +#elif defined __NVCC__ + #pragma diag_suppress code_is_unreachable #endif #endif // not EIGEN_WARNINGS_DISABLED diff --git a/Eigen/src/Core/util/ReenableStupidWarnings.h b/Eigen/src/Core/util/ReenableStupidWarnings.h index 5ddfbd4aa..4a2e0d54a 100644 --- a/Eigen/src/Core/util/ReenableStupidWarnings.h +++ b/Eigen/src/Core/util/ReenableStupidWarnings.h @@ -8,6 +8,9 @@ #pragma warning pop #elif defined __clang__ #pragma clang diagnostic pop + #elif defined __NVCC__ + #pragma diag_warning code_is_unreachable + #pragma diag_warning initialization_not_reachable #endif #endif