diff --git a/Eigen/Cholesky b/Eigen/Cholesky index b6c83e0ef..53f7bf911 100644 --- a/Eigen/Cholesky +++ b/Eigen/Cholesky @@ -3,7 +3,7 @@ #include "Core" -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" namespace Eigen { @@ -27,7 +27,7 @@ namespace Eigen { } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_CHOLESKY_MODULE_H /* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Eigen/Core b/Eigen/Core index f5c555e55..7f384662e 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -26,8 +26,8 @@ #ifndef EIGEN_CORE_H #define EIGEN_CORE_H -// first thing Eigen does: prevent MSVC from committing suicide -#include "src/Core/util/DisableMSVCWarnings.h" +// first thing Eigen does: stop the compiler from committing suicide +#include "src/Core/util/DisableStupidWarnings.h" // then include this file where all our macros are defined. It's really important to do it first because // it's where we do all the alignment settings (platform detection and honoring the user's will if he @@ -354,7 +354,7 @@ using std::size_t; #include "src/Core/GlobalFunctions.h" -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #ifdef EIGEN2_SUPPORT #include "Eigen2Support" diff --git a/Eigen/Eigen2Support b/Eigen/Eigen2Support index 9fa378795..d96592a8d 100644 --- a/Eigen/Eigen2Support +++ b/Eigen/Eigen2Support @@ -29,7 +29,7 @@ #error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header #endif -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" namespace Eigen { @@ -58,7 +58,7 @@ namespace Eigen { } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" // Eigen2 used to include iostream #include diff --git a/Eigen/Eigenvalues b/Eigen/Eigenvalues index de85fc5b9..250c0f466 100644 --- a/Eigen/Eigenvalues +++ b/Eigen/Eigenvalues @@ -3,7 +3,7 @@ #include "Core" -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" #include "Cholesky" #include "Jacobi" @@ -38,7 +38,7 @@ namespace Eigen { } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_EIGENVALUES_MODULE_H /* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Eigen/Geometry b/Eigen/Geometry index 35bd153f4..78277c0c5 100644 --- a/Eigen/Geometry +++ b/Eigen/Geometry @@ -3,7 +3,7 @@ #include "Core" -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" #include "SVD" #include "LU" @@ -60,7 +60,7 @@ namespace Eigen { } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_GEOMETRY_MODULE_H /* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Eigen/Householder b/Eigen/Householder index 11a6eefd1..6b86cf65c 100644 --- a/Eigen/Householder +++ b/Eigen/Householder @@ -3,7 +3,7 @@ #include "Core" -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" namespace Eigen { @@ -21,7 +21,7 @@ namespace Eigen { } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_HOUSEHOLDER_MODULE_H /* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Eigen/Jacobi b/Eigen/Jacobi index ce6ac1bff..afa676813 100644 --- a/Eigen/Jacobi +++ b/Eigen/Jacobi @@ -3,7 +3,7 @@ #include "Core" -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" namespace Eigen { @@ -23,7 +23,7 @@ namespace Eigen { } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_JACOBI_MODULE_H /* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Eigen/LU b/Eigen/LU index cca3af154..226f88ca3 100644 --- a/Eigen/LU +++ b/Eigen/LU @@ -3,7 +3,7 @@ #include "Core" -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" namespace Eigen { @@ -36,7 +36,7 @@ namespace Eigen { } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_LU_MODULE_H /* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Eigen/LeastSquares b/Eigen/LeastSquares index a56656c36..6c51bf391 100644 --- a/Eigen/LeastSquares +++ b/Eigen/LeastSquares @@ -7,7 +7,7 @@ #include "Core" -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" #include "Eigenvalues" #include "Geometry" @@ -26,6 +26,6 @@ namespace Eigen { } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_REGRESSION_MODULE_H diff --git a/Eigen/QR b/Eigen/QR index 4dfb23782..97c1788ee 100644 --- a/Eigen/QR +++ b/Eigen/QR @@ -3,7 +3,7 @@ #include "Core" -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" #include "Cholesky" #include "Jacobi" @@ -35,7 +35,7 @@ namespace Eigen { } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #ifdef EIGEN2_SUPPORT #include "Eigenvalues" diff --git a/Eigen/QtAlignedMalloc b/Eigen/QtAlignedMalloc index 5ae9f0cda..46f7d83b7 100644 --- a/Eigen/QtAlignedMalloc +++ b/Eigen/QtAlignedMalloc @@ -6,7 +6,7 @@ #if (!EIGEN_MALLOC_ALREADY_ALIGNED) -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" void *qMalloc(size_t size) { @@ -26,7 +26,7 @@ void *qRealloc(void *ptr, size_t size) return newPtr; } -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #endif diff --git a/Eigen/SVD b/Eigen/SVD index c621f6da4..d24471fd7 100644 --- a/Eigen/SVD +++ b/Eigen/SVD @@ -5,7 +5,7 @@ #include "Householder" #include "Jacobi" -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" namespace Eigen { @@ -32,7 +32,7 @@ namespace Eigen { } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_SVD_MODULE_H /* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Eigen/Sparse b/Eigen/Sparse index 67a4060c9..7425b3a41 100644 --- a/Eigen/Sparse +++ b/Eigen/Sparse @@ -3,7 +3,7 @@ #include "Core" -#include "src/Core/util/DisableMSVCWarnings.h" +#include "src/Core/util/DisableStupidWarnings.h" #include #include @@ -63,7 +63,7 @@ struct Sparse {}; } // namespace Eigen -#include "src/Core/util/EnableMSVCWarnings.h" +#include "src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_SPARSE_MODULE_H diff --git a/Eigen/src/Core/util/DisableMSVCWarnings.h b/Eigen/src/Core/util/DisableStupidWarnings.h similarity index 62% rename from Eigen/src/Core/util/DisableMSVCWarnings.h rename to Eigen/src/Core/util/DisableStupidWarnings.h index 7de55d83c..01c04abdc 100644 --- a/Eigen/src/Core/util/DisableMSVCWarnings.h +++ b/Eigen/src/Core/util/DisableStupidWarnings.h @@ -1,4 +1,3 @@ - #ifdef _MSC_VER // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p)) // 4101 - unreferenced local variable @@ -14,4 +13,12 @@ // 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow #pragma warning( push ) #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4512 4522 4700 4717 ) -#endif +#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 + // 2536 - type qualifiers are meaningless here + // ICC 12 generates this warning when a function return type is const qualified, even if that type is a template-parameter-dependent + // typedef that may be a reference type + #pragma warning push + #pragma warning disable 2196 2536 +#endif \ No newline at end of file diff --git a/Eigen/src/Core/util/EnableMSVCWarnings.h b/Eigen/src/Core/util/EnableMSVCWarnings.h deleted file mode 100644 index 8bd61601e..000000000 --- a/Eigen/src/Core/util/EnableMSVCWarnings.h +++ /dev/null @@ -1,4 +0,0 @@ - -#ifdef _MSC_VER - #pragma warning( pop ) -#endif diff --git a/Eigen/src/Core/util/ReenableStupidWarnings.h b/Eigen/src/Core/util/ReenableStupidWarnings.h new file mode 100644 index 000000000..d1164a82c --- /dev/null +++ b/Eigen/src/Core/util/ReenableStupidWarnings.h @@ -0,0 +1,5 @@ +#ifdef _MSC_VER + #pragma warning( pop ) +#elif defined __intel_compiler + #pragma warning pop +#endif \ No newline at end of file diff --git a/unsupported/Eigen/CholmodSupport b/unsupported/Eigen/CholmodSupport index 8253ad167..8a4a130c3 100644 --- a/unsupported/Eigen/CholmodSupport +++ b/unsupported/Eigen/CholmodSupport @@ -3,7 +3,7 @@ #include "SparseExtra" -#include "../../Eigen/src/Core/util/DisableMSVCWarnings.h" +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" extern "C" { #include @@ -27,7 +27,7 @@ struct Cholmod {}; } // namespace Eigen -#include "../../Eigen/src/Core/util/EnableMSVCWarnings.h" +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_CHOLMODSUPPORT_MODULE_H diff --git a/unsupported/Eigen/Polynomials b/unsupported/Eigen/Polynomials index 1ca01a8b7..2c2f3e100 100644 --- a/unsupported/Eigen/Polynomials +++ b/unsupported/Eigen/Polynomials @@ -3,7 +3,7 @@ #include -#include +#include #include @@ -131,7 +131,7 @@ namespace Eigen { } // namespace Eigen -#include +#include #endif // EIGEN_POLYNOMIALS_MODULE_H /* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/unsupported/Eigen/Skyline b/unsupported/Eigen/Skyline index 5e080330c..5247b2eab 100644 --- a/unsupported/Eigen/Skyline +++ b/unsupported/Eigen/Skyline @@ -4,7 +4,7 @@ #include "Eigen/Core" -#include "Eigen/src/Core/util/DisableMSVCWarnings.h" +#include "Eigen/src/Core/util/DisableStupidWarnings.h" #include #include @@ -30,6 +30,6 @@ namespace Eigen { } // namespace Eigen -#include "Eigen/src/Core/util/EnableMSVCWarnings.h" +#include "Eigen/src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_SKYLINE_MODULE_H diff --git a/unsupported/Eigen/SparseExtra b/unsupported/Eigen/SparseExtra index 3611d6f32..7bab7c72b 100644 --- a/unsupported/Eigen/SparseExtra +++ b/unsupported/Eigen/SparseExtra @@ -3,7 +3,7 @@ #include "../../Eigen/Sparse" -#include "../../Eigen/src/Core/util/DisableMSVCWarnings.h" +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" #include #include @@ -64,6 +64,6 @@ enum { } // namespace Eigen -#include "../../Eigen/src/Core/util/EnableMSVCWarnings.h" +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_SPARSE_EXTRA_MODULE_H diff --git a/unsupported/Eigen/SuperLUSupport b/unsupported/Eigen/SuperLUSupport index 1a6ada619..89cb649b2 100644 --- a/unsupported/Eigen/SuperLUSupport +++ b/unsupported/Eigen/SuperLUSupport @@ -3,7 +3,7 @@ #include "SparseExtra" -#include "../../Eigen/src/Core/util/DisableMSVCWarnings.h" +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" typedef int int_t; #include @@ -30,6 +30,6 @@ struct SuperLU {}; } // namespace Eigen -#include "../../Eigen/src/Core/util/EnableMSVCWarnings.h" +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_SUPERLUSUPPORT_MODULE_H diff --git a/unsupported/Eigen/UmfPackSupport b/unsupported/Eigen/UmfPackSupport index c49f20145..c8b1e7c1f 100644 --- a/unsupported/Eigen/UmfPackSupport +++ b/unsupported/Eigen/UmfPackSupport @@ -3,7 +3,7 @@ #include "SparseExtra" -#include "../../Eigen/src/Core/util/DisableMSVCWarnings.h" +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" extern "C" { #include @@ -28,6 +28,6 @@ struct UmfPack {}; } // namespace Eigen -#include "../../Eigen/src/Core/util/EnableMSVCWarnings.h" +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_UMFPACKSUPPORT_MODULE_H diff --git a/unsupported/test/NonLinearOptimization.cpp b/unsupported/test/NonLinearOptimization.cpp index 196cf15e0..81b066897 100644 --- a/unsupported/test/NonLinearOptimization.cpp +++ b/unsupported/test/NonLinearOptimization.cpp @@ -10,7 +10,7 @@ // This disables some useless Warnings on MSVC. // It is intended to be done for this test only. -#include +#include int fcn_chkder(const VectorXd &x, VectorXd &fvec, MatrixXd &fjac, int iflag) {