shut up stupid ICC warnings

This commit is contained in:
Benoit Jacob 2011-02-22 09:31:22 -05:00
parent 625814464e
commit d8e97aee89
23 changed files with 54 additions and 46 deletions

View File

@ -3,7 +3,7 @@
#include "Core" #include "Core"
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
namespace Eigen { namespace Eigen {
@ -27,7 +27,7 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_CHOLESKY_MODULE_H #endif // EIGEN_CHOLESKY_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */ /* vim: set filetype=cpp et sw=2 ts=2 ai: */

View File

@ -26,8 +26,8 @@
#ifndef EIGEN_CORE_H #ifndef EIGEN_CORE_H
#define EIGEN_CORE_H #define EIGEN_CORE_H
// first thing Eigen does: prevent MSVC from committing suicide // first thing Eigen does: stop the compiler from committing suicide
#include "src/Core/util/DisableMSVCWarnings.h" #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 // 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 // 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/GlobalFunctions.h"
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#ifdef EIGEN2_SUPPORT #ifdef EIGEN2_SUPPORT
#include "Eigen2Support" #include "Eigen2Support"

View File

@ -29,7 +29,7 @@
#error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header #error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header
#endif #endif
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
namespace Eigen { namespace Eigen {
@ -58,7 +58,7 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
// Eigen2 used to include iostream // Eigen2 used to include iostream
#include<iostream> #include<iostream>

View File

@ -3,7 +3,7 @@
#include "Core" #include "Core"
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
#include "Cholesky" #include "Cholesky"
#include "Jacobi" #include "Jacobi"
@ -38,7 +38,7 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_EIGENVALUES_MODULE_H #endif // EIGEN_EIGENVALUES_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */ /* vim: set filetype=cpp et sw=2 ts=2 ai: */

View File

@ -3,7 +3,7 @@
#include "Core" #include "Core"
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
#include "SVD" #include "SVD"
#include "LU" #include "LU"
@ -60,7 +60,7 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_GEOMETRY_MODULE_H #endif // EIGEN_GEOMETRY_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */ /* vim: set filetype=cpp et sw=2 ts=2 ai: */

View File

@ -3,7 +3,7 @@
#include "Core" #include "Core"
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
namespace Eigen { namespace Eigen {
@ -21,7 +21,7 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_HOUSEHOLDER_MODULE_H #endif // EIGEN_HOUSEHOLDER_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */ /* vim: set filetype=cpp et sw=2 ts=2 ai: */

View File

@ -3,7 +3,7 @@
#include "Core" #include "Core"
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
namespace Eigen { namespace Eigen {
@ -23,7 +23,7 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_JACOBI_MODULE_H #endif // EIGEN_JACOBI_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */ /* vim: set filetype=cpp et sw=2 ts=2 ai: */

View File

@ -3,7 +3,7 @@
#include "Core" #include "Core"
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
namespace Eigen { namespace Eigen {
@ -36,7 +36,7 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_LU_MODULE_H #endif // EIGEN_LU_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */ /* vim: set filetype=cpp et sw=2 ts=2 ai: */

View File

@ -7,7 +7,7 @@
#include "Core" #include "Core"
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
#include "Eigenvalues" #include "Eigenvalues"
#include "Geometry" #include "Geometry"
@ -26,6 +26,6 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_REGRESSION_MODULE_H #endif // EIGEN_REGRESSION_MODULE_H

View File

@ -3,7 +3,7 @@
#include "Core" #include "Core"
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
#include "Cholesky" #include "Cholesky"
#include "Jacobi" #include "Jacobi"
@ -35,7 +35,7 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#ifdef EIGEN2_SUPPORT #ifdef EIGEN2_SUPPORT
#include "Eigenvalues" #include "Eigenvalues"

View File

@ -6,7 +6,7 @@
#if (!EIGEN_MALLOC_ALREADY_ALIGNED) #if (!EIGEN_MALLOC_ALREADY_ALIGNED)
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
void *qMalloc(size_t size) void *qMalloc(size_t size)
{ {
@ -26,7 +26,7 @@ void *qRealloc(void *ptr, size_t size)
return newPtr; return newPtr;
} }
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#endif #endif

View File

@ -5,7 +5,7 @@
#include "Householder" #include "Householder"
#include "Jacobi" #include "Jacobi"
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
namespace Eigen { namespace Eigen {
@ -32,7 +32,7 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_SVD_MODULE_H #endif // EIGEN_SVD_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */ /* vim: set filetype=cpp et sw=2 ts=2 ai: */

View File

@ -3,7 +3,7 @@
#include "Core" #include "Core"
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableStupidWarnings.h"
#include <vector> #include <vector>
#include <map> #include <map>
@ -63,7 +63,7 @@ struct Sparse {};
} // namespace Eigen } // namespace Eigen
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_SPARSE_MODULE_H #endif // EIGEN_SPARSE_MODULE_H

View File

@ -1,4 +1,3 @@
#ifdef _MSC_VER #ifdef _MSC_VER
// 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p)) // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p))
// 4101 - unreferenced local variable // 4101 - unreferenced local variable
@ -14,4 +13,12 @@
// 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow // 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow
#pragma warning( push ) #pragma warning( push )
#pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4512 4522 4700 4717 ) #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4512 4522 4700 4717 )
#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 #endif

View File

@ -1,4 +0,0 @@
#ifdef _MSC_VER
#pragma warning( pop )
#endif

View File

@ -0,0 +1,5 @@
#ifdef _MSC_VER
#pragma warning( pop )
#elif defined __intel_compiler
#pragma warning pop
#endif

View File

@ -3,7 +3,7 @@
#include "SparseExtra" #include "SparseExtra"
#include "../../Eigen/src/Core/util/DisableMSVCWarnings.h" #include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
extern "C" { extern "C" {
#include <cholmod.h> #include <cholmod.h>
@ -27,7 +27,7 @@ struct Cholmod {};
} // namespace Eigen } // namespace Eigen
#include "../../Eigen/src/Core/util/EnableMSVCWarnings.h" #include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_CHOLMODSUPPORT_MODULE_H #endif // EIGEN_CHOLMODSUPPORT_MODULE_H

View File

@ -3,7 +3,7 @@
#include <Eigen/Core> #include <Eigen/Core>
#include <Eigen/src/Core/util/DisableMSVCWarnings.h> #include <Eigen/src/Core/util/DisableStupidWarnings.h>
#include <Eigen/Eigenvalues> #include <Eigen/Eigenvalues>
@ -131,7 +131,7 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include <Eigen/src/Core/util/EnableMSVCWarnings.h> #include <Eigen/src/Core/util/ReenableStupidWarnings.h>
#endif // EIGEN_POLYNOMIALS_MODULE_H #endif // EIGEN_POLYNOMIALS_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */ /* vim: set filetype=cpp et sw=2 ts=2 ai: */

View File

@ -4,7 +4,7 @@
#include "Eigen/Core" #include "Eigen/Core"
#include "Eigen/src/Core/util/DisableMSVCWarnings.h" #include "Eigen/src/Core/util/DisableStupidWarnings.h"
#include <map> #include <map>
#include <cstdlib> #include <cstdlib>
@ -30,6 +30,6 @@ namespace Eigen {
} // namespace Eigen } // namespace Eigen
#include "Eigen/src/Core/util/EnableMSVCWarnings.h" #include "Eigen/src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_SKYLINE_MODULE_H #endif // EIGEN_SKYLINE_MODULE_H

View File

@ -3,7 +3,7 @@
#include "../../Eigen/Sparse" #include "../../Eigen/Sparse"
#include "../../Eigen/src/Core/util/DisableMSVCWarnings.h" #include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
#include <vector> #include <vector>
#include <map> #include <map>
@ -64,6 +64,6 @@ enum {
} // namespace Eigen } // namespace Eigen
#include "../../Eigen/src/Core/util/EnableMSVCWarnings.h" #include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_SPARSE_EXTRA_MODULE_H #endif // EIGEN_SPARSE_EXTRA_MODULE_H

View File

@ -3,7 +3,7 @@
#include "SparseExtra" #include "SparseExtra"
#include "../../Eigen/src/Core/util/DisableMSVCWarnings.h" #include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
typedef int int_t; typedef int int_t;
#include <slu_Cnames.h> #include <slu_Cnames.h>
@ -30,6 +30,6 @@ struct SuperLU {};
} // namespace Eigen } // namespace Eigen
#include "../../Eigen/src/Core/util/EnableMSVCWarnings.h" #include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_SUPERLUSUPPORT_MODULE_H #endif // EIGEN_SUPERLUSUPPORT_MODULE_H

View File

@ -3,7 +3,7 @@
#include "SparseExtra" #include "SparseExtra"
#include "../../Eigen/src/Core/util/DisableMSVCWarnings.h" #include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
extern "C" { extern "C" {
#include <umfpack.h> #include <umfpack.h>
@ -28,6 +28,6 @@ struct UmfPack {};
} // namespace Eigen } // namespace Eigen
#include "../../Eigen/src/Core/util/EnableMSVCWarnings.h" #include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_UMFPACKSUPPORT_MODULE_H #endif // EIGEN_UMFPACKSUPPORT_MODULE_H

View File

@ -10,7 +10,7 @@
// This disables some useless Warnings on MSVC. // This disables some useless Warnings on MSVC.
// It is intended to be done for this test only. // It is intended to be done for this test only.
#include <Eigen/src/Core/util/DisableMSVCWarnings.h> #include <Eigen/src/Core/util/DisableStupidWarnings.h>
int fcn_chkder(const VectorXd &x, VectorXd &fvec, MatrixXd &fjac, int iflag) int fcn_chkder(const VectorXd &x, VectorXd &fvec, MatrixXd &fjac, int iflag)
{ {