diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2018-08-28 18:32:39 +0200 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2018-08-28 18:32:39 +0200 |
commit | 73ca600bca42f5ccf507ca4be1f53921973b44fe (patch) | |
tree | b7e2608239cd7179c02efcfe2bddfb5c4d74ca04 | |
parent | ef4d79fed8b84f03fe3c7ace98442c822cf3472a (diff) |
Fix numerous shadow-warnings for GCC<=4.8
-rw-r--r-- | Eigen/SparseLU | 4 | ||||
-rw-r--r-- | Eigen/src/StlSupport/StdDeque.h | 2 | ||||
-rw-r--r-- | Eigen/src/StlSupport/StdList.h | 2 | ||||
-rw-r--r-- | Eigen/src/StlSupport/StdVector.h | 2 | ||||
-rw-r--r-- | blas/common.h | 8 | ||||
-rw-r--r-- | test/mapstaticmethods.cpp | 4 | ||||
-rw-r--r-- | unsupported/Eigen/AlignedVector3 | 4 | ||||
-rw-r--r-- | unsupported/Eigen/AutoDiff | 6 | ||||
-rw-r--r-- | unsupported/Eigen/CXX11/Tensor | 4 | ||||
-rw-r--r-- | unsupported/Eigen/FFT | 5 | ||||
-rw-r--r-- | unsupported/Eigen/IterativeSolvers | 8 | ||||
-rw-r--r-- | unsupported/Eigen/LevenbergMarquardt | 4 | ||||
-rw-r--r-- | unsupported/Eigen/MatrixFunctions | 4 | ||||
-rw-r--r-- | unsupported/Eigen/Splines | 4 | ||||
-rw-r--r-- | unsupported/test/NumericalDiff.cpp | 2 | ||||
-rw-r--r-- | unsupported/test/autodiff.cpp | 2 | ||||
-rw-r--r-- | unsupported/test/dgmres.cpp | 2 | ||||
-rw-r--r-- | unsupported/test/forward_adolc.cpp | 2 |
18 files changed, 58 insertions, 11 deletions
diff --git a/Eigen/SparseLU b/Eigen/SparseLU index 38b38b531..37c4a5c5a 100644 --- a/Eigen/SparseLU +++ b/Eigen/SparseLU @@ -23,6 +23,8 @@ // Ordering interface #include "OrderingMethods" +#include "src/Core/util/DisableStupidWarnings.h" + #include "src/SparseLU/SparseLU_gemm_kernel.h" #include "src/SparseLU/SparseLU_Structs.h" @@ -43,4 +45,6 @@ #include "src/SparseLU/SparseLU_Utils.h" #include "src/SparseLU/SparseLU.h" +#include "src/Core/util/ReenableStupidWarnings.h" + #endif // EIGEN_SPARSELU_MODULE_H diff --git a/Eigen/src/StlSupport/StdDeque.h b/Eigen/src/StlSupport/StdDeque.h index cf1fedf92..8adfbb5c1 100644 --- a/Eigen/src/StlSupport/StdDeque.h +++ b/Eigen/src/StlSupport/StdDeque.h @@ -36,7 +36,7 @@ namespace std \ deque(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : deque_base(first, last, a) {} \ deque(const deque& c) : deque_base(c) {} \ explicit deque(size_type num, const value_type& val = value_type()) : deque_base(num, val) {} \ - deque(iterator start, iterator end) : deque_base(start, end) {} \ + deque(iterator start_, iterator end_) : deque_base(start_, end_) {} \ deque& operator=(const deque& x) { \ deque_base::operator=(x); \ return *this; \ diff --git a/Eigen/src/StlSupport/StdList.h b/Eigen/src/StlSupport/StdList.h index e1eba4985..1b6d44061 100644 --- a/Eigen/src/StlSupport/StdList.h +++ b/Eigen/src/StlSupport/StdList.h @@ -35,7 +35,7 @@ namespace std \ list(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : list_base(first, last, a) {} \ list(const list& c) : list_base(c) {} \ explicit list(size_type num, const value_type& val = value_type()) : list_base(num, val) {} \ - list(iterator start, iterator end) : list_base(start, end) {} \ + list(iterator start_, iterator end_) : list_base(start_, end_) {} \ list& operator=(const list& x) { \ list_base::operator=(x); \ return *this; \ diff --git a/Eigen/src/StlSupport/StdVector.h b/Eigen/src/StlSupport/StdVector.h index ec22821d2..7787edd72 100644 --- a/Eigen/src/StlSupport/StdVector.h +++ b/Eigen/src/StlSupport/StdVector.h @@ -36,7 +36,7 @@ namespace std \ vector(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : vector_base(first, last, a) {} \ vector(const vector& c) : vector_base(c) {} \ explicit vector(size_type num, const value_type& val = value_type()) : vector_base(num, val) {} \ - vector(iterator start, iterator end) : vector_base(start, end) {} \ + vector(iterator start_, iterator end_) : vector_base(start_, end_) {} \ vector& operator=(const vector& x) { \ vector_base::operator=(x); \ return *this; \ diff --git a/blas/common.h b/blas/common.h index 61d8344d9..960c09cc6 100644 --- a/blas/common.h +++ b/blas/common.h @@ -10,6 +10,14 @@ #ifndef EIGEN_BLAS_COMMON_H #define EIGEN_BLAS_COMMON_H +#ifdef __GNUC__ +# if __GNUC__<5 +// GCC < 5.0 does not like the global Scalar typedef +// we just keep shadow-warnings disabled permanently +# define EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS +# endif +#endif + #include "../Eigen/Core" #include "../Eigen/Jacobi" diff --git a/test/mapstaticmethods.cpp b/test/mapstaticmethods.cpp index f32c0beec..d0128ba94 100644 --- a/test/mapstaticmethods.cpp +++ b/test/mapstaticmethods.cpp @@ -9,8 +9,12 @@ #include "main.h" +// GCC<=4.8 has spurious shadow warnings, because `ptr` re-appears inside template instantiations +// workaround: put these in an anonymous namespace +namespace { float *ptr; const float *const_ptr; +} template<typename PlainObjectType, bool IsDynamicSize = PlainObjectType::SizeAtCompileTime == Dynamic, diff --git a/unsupported/Eigen/AlignedVector3 b/unsupported/Eigen/AlignedVector3 index 47a86d4c0..c16f16a97 100644 --- a/unsupported/Eigen/AlignedVector3 +++ b/unsupported/Eigen/AlignedVector3 @@ -12,6 +12,8 @@ #include <Eigen/Geometry> +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" + namespace Eigen { /** @@ -221,4 +223,6 @@ struct evaluator<AlignedVector3<Scalar> > } +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" + #endif // EIGEN_ALIGNED_VECTOR3 diff --git a/unsupported/Eigen/AutoDiff b/unsupported/Eigen/AutoDiff index abf5b7d67..7a4ff460c 100644 --- a/unsupported/Eigen/AutoDiff +++ b/unsupported/Eigen/AutoDiff @@ -28,11 +28,17 @@ namespace Eigen { //@{ } +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" + #include "src/AutoDiff/AutoDiffScalar.h" // #include "src/AutoDiff/AutoDiffVector.h" #include "src/AutoDiff/AutoDiffJacobian.h" +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" + + + namespace Eigen { //@} } diff --git a/unsupported/Eigen/CXX11/Tensor b/unsupported/Eigen/CXX11/Tensor index 47514703a..0165d0144 100644 --- a/unsupported/Eigen/CXX11/Tensor +++ b/unsupported/Eigen/CXX11/Tensor @@ -26,9 +26,9 @@ #include <utility> #endif -#include <Eigen/src/Core/util/DisableStupidWarnings.h> - #include "../SpecialFunctions" + +#include <Eigen/src/Core/util/DisableStupidWarnings.h> #include "src/util/CXX11Meta.h" #include "src/util/MaxSizeVector.h" diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT index d8cf3e642..8ae053677 100644 --- a/unsupported/Eigen/FFT +++ b/unsupported/Eigen/FFT @@ -68,6 +68,8 @@ */ +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" + #ifdef EIGEN_FFTW_DEFAULT // FFTW: faster, GPL -- incompatible with Eigen in LGPL form, bigger code size # include <fftw3.h> @@ -415,5 +417,8 @@ void fft_inv_proxy<T_SrcMat,T_FftIfc>::evalTo(T_DestMat& dst) const } } + +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" + #endif /* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/unsupported/Eigen/IterativeSolvers b/unsupported/Eigen/IterativeSolvers index 31e880bdc..fe8a6d00d 100644 --- a/unsupported/Eigen/IterativeSolvers +++ b/unsupported/Eigen/IterativeSolvers @@ -11,6 +11,8 @@ #define EIGEN_ITERATIVE_SOLVERS_MODULE_H #include <Eigen/Sparse> +#include "../../Eigen/Jacobi" +#include "../../Eigen/Householder" /** * \defgroup IterativeSolvers_Module Iterative solvers module @@ -24,19 +26,21 @@ */ //@{ +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" + #ifndef EIGEN_MPL2_ONLY #include "src/IterativeSolvers/IterationController.h" #include "src/IterativeSolvers/ConstrainedConjGrad.h" #endif #include "src/IterativeSolvers/IncompleteLU.h" -#include "../../Eigen/Jacobi" -#include "../../Eigen/Householder" #include "src/IterativeSolvers/GMRES.h" #include "src/IterativeSolvers/DGMRES.h" //#include "src/IterativeSolvers/SSORPreconditioner.h" #include "src/IterativeSolvers/MINRES.h" +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" + //@} #endif // EIGEN_ITERATIVE_SOLVERS_MODULE_H diff --git a/unsupported/Eigen/LevenbergMarquardt b/unsupported/Eigen/LevenbergMarquardt index 0fe2680ba..e77b746c9 100644 --- a/unsupported/Eigen/LevenbergMarquardt +++ b/unsupported/Eigen/LevenbergMarquardt @@ -30,6 +30,9 @@ */ #include "Eigen/SparseCore" + +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" + #ifndef EIGEN_PARSED_BY_DOXYGEN #include "src/LevenbergMarquardt/LMqrsolv.h" @@ -41,5 +44,6 @@ #include "src/LevenbergMarquardt/LevenbergMarquardt.h" #include "src/LevenbergMarquardt/LMonestep.h" +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" #endif // EIGEN_LEVENBERGMARQUARDT_MODULE diff --git a/unsupported/Eigen/MatrixFunctions b/unsupported/Eigen/MatrixFunctions index 0320606c1..17eef8813 100644 --- a/unsupported/Eigen/MatrixFunctions +++ b/unsupported/Eigen/MatrixFunctions @@ -53,12 +53,16 @@ * */ +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" + #include "src/MatrixFunctions/MatrixExponential.h" #include "src/MatrixFunctions/MatrixFunction.h" #include "src/MatrixFunctions/MatrixSquareRoot.h" #include "src/MatrixFunctions/MatrixLogarithm.h" #include "src/MatrixFunctions/MatrixPower.h" +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" + /** \page matrixbaseextra_page diff --git a/unsupported/Eigen/Splines b/unsupported/Eigen/Splines index 322e6b9f5..2ca581364 100644 --- a/unsupported/Eigen/Splines +++ b/unsupported/Eigen/Splines @@ -24,8 +24,12 @@ namespace Eigen */ } +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" + #include "src/Splines/SplineFwd.h" #include "src/Splines/Spline.h" #include "src/Splines/SplineFitting.h" +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" + #endif // EIGEN_SPLINES_MODULE_H diff --git a/unsupported/test/NumericalDiff.cpp b/unsupported/test/NumericalDiff.cpp index 35f2f6d7c..6d836413b 100644 --- a/unsupported/test/NumericalDiff.cpp +++ b/unsupported/test/NumericalDiff.cpp @@ -24,7 +24,7 @@ struct Functor int m_inputs, m_values; Functor() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {} - Functor(int inputs, int values) : m_inputs(inputs), m_values(values) {} + Functor(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {} int inputs() const { return m_inputs; } int values() const { return m_values; } diff --git a/unsupported/test/autodiff.cpp b/unsupported/test/autodiff.cpp index 495cee03e..bafea6ae9 100644 --- a/unsupported/test/autodiff.cpp +++ b/unsupported/test/autodiff.cpp @@ -44,7 +44,7 @@ struct TestFunc1 int m_inputs, m_values; TestFunc1() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {} - TestFunc1(int inputs, int values) : m_inputs(inputs), m_values(values) {} + TestFunc1(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {} int inputs() const { return m_inputs; } int values() const { return m_values; } diff --git a/unsupported/test/dgmres.cpp b/unsupported/test/dgmres.cpp index 04f5ad670..5f63161b2 100644 --- a/unsupported/test/dgmres.cpp +++ b/unsupported/test/dgmres.cpp @@ -9,7 +9,7 @@ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. #include "../../test/sparse_solver.h" -#include <Eigen/src/IterativeSolvers/DGMRES.h> +#include <unsupported/Eigen/IterativeSolvers> template<typename T> void test_dgmres_T() { diff --git a/unsupported/test/forward_adolc.cpp b/unsupported/test/forward_adolc.cpp index 688594eff..14a909d3b 100644 --- a/unsupported/test/forward_adolc.cpp +++ b/unsupported/test/forward_adolc.cpp @@ -35,7 +35,7 @@ struct TestFunc1 int m_inputs, m_values; TestFunc1() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {} - TestFunc1(int inputs, int values) : m_inputs(inputs), m_values(values) {} + TestFunc1(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {} int inputs() const { return m_inputs; } int values() const { return m_values; } |