From 970751ece3fe101acbb64ebb4aa469a9b1d635e4 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Tue, 9 Feb 2016 20:55:50 -0800 Subject: [PATCH] Disabling the nvcc warnings in addition to the clang warnings when clang is used as a frontend for nvcc --- Eigen/src/Core/util/DisableStupidWarnings.h | 3 ++- Eigen/src/Core/util/ReenableStupidWarnings.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/util/DisableStupidWarnings.h b/Eigen/src/Core/util/DisableStupidWarnings.h index 829b23ac8..cb27acff7 100755 --- a/Eigen/src/Core/util/DisableStupidWarnings.h +++ b/Eigen/src/Core/util/DisableStupidWarnings.h @@ -41,8 +41,9 @@ #pragma clang diagnostic push #endif #pragma clang diagnostic ignored "-Wconstant-logical-operand" +#endif -#elif defined __NVCC__ +#if defined __NVCC__ // Disable the "statement is unreachable" message #pragma diag_suppress code_is_unreachable // Disable the "dynamic initialization in unreachable code" message diff --git a/Eigen/src/Core/util/ReenableStupidWarnings.h b/Eigen/src/Core/util/ReenableStupidWarnings.h index ea88e226c..a23fab198 100644 --- a/Eigen/src/Core/util/ReenableStupidWarnings.h +++ b/Eigen/src/Core/util/ReenableStupidWarnings.h @@ -8,7 +8,9 @@ #pragma warning pop #elif defined __clang__ #pragma clang diagnostic pop - #elif defined __NVCC__ + #endif + + #if defined __NVCC__ // Don't reenable the diagnostic messages, as it turns out these messages need // to be disabled at the point of the template instantiation (i.e the user code) // otherwise they'll be triggeredby nvcc.