diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2018-08-28 18:26:22 +0200 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2018-08-28 18:26:22 +0200 |
commit | ef4d79fed8b84f03fe3c7ace98442c822cf3472a (patch) | |
tree | bed73281091dd10a1b3d8b9938ae255f612f07a5 | |
parent | befaf83f5f4cfafc7b17c8e384e0457c8493393f (diff) |
Disable/ReenableStupidWarnings did not work properly, when included recursively
-rwxr-xr-x | Eigen/src/Core/util/DisableStupidWarnings.h | 8 | ||||
-rw-r--r-- | Eigen/src/Core/util/ReenableStupidWarnings.h | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/Eigen/src/Core/util/DisableStupidWarnings.h b/Eigen/src/Core/util/DisableStupidWarnings.h index af832ae77..d04b52649 100755 --- a/Eigen/src/Core/util/DisableStupidWarnings.h +++ b/Eigen/src/Core/util/DisableStupidWarnings.h @@ -80,4 +80,12 @@ #pragma diag_suppress 2739 #endif +#else +// warnings already disabled: +# ifndef EIGEN_WARNINGS_DISABLED_2 +# define EIGEN_WARNINGS_DISABLED_2 +# elif defined(EIGEN_INTERNAL_DEBUGGING) +# error "Do not include \"DisableStupidWarnings.h\" recursively more than twice!" +# endif + #endif // not EIGEN_WARNINGS_DISABLED diff --git a/Eigen/src/Core/util/ReenableStupidWarnings.h b/Eigen/src/Core/util/ReenableStupidWarnings.h index e9353a623..e23a128d1 100644 --- a/Eigen/src/Core/util/ReenableStupidWarnings.h +++ b/Eigen/src/Core/util/ReenableStupidWarnings.h @@ -1,4 +1,8 @@ -#ifdef EIGEN_WARNINGS_DISABLED +#ifdef EIGEN_WARNINGS_DISABLED_2 +// "DisableStupidWarnings.h" was included twice recursively: Do not reenable warnings yet! +# undef EIGEN_WARNINGS_DISABLED_2 + +#elif defined(EIGEN_WARNINGS_DISABLED) #undef EIGEN_WARNINGS_DISABLED #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS |