diff --git a/CMakeLists.txt b/CMakeLists.txt index aee1a9263..96fcc7a1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_SYSTEM_NAME MATCHES Linux) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wextra -fno-exceptions -fno-check-new -fno-common -fstrict-aliasing") + include(CheckCXXCompilerFlag) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-exceptions -fno-check-new -fno-common -fstrict-aliasing") + check_cxx_compiler_flag("-Wextra" has_wextra) + if(has_wextra) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") + endif() if(NOT EIGEN_TEST_LIB) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") endif(NOT EIGEN_TEST_LIB) diff --git a/Eigen/StdVector b/Eigen/StdVector index c0744d6a0..5a88402a5 100644 --- a/Eigen/StdVector +++ b/Eigen/StdVector @@ -144,4 +144,4 @@ class vector #endif // EIGEN_STDVECTOR_MODULE_H -#endif // EIGEN_USE_NEW_STDVECTOR \ No newline at end of file +#endif // EIGEN_USE_NEW_STDVECTOR diff --git a/Eigen/src/Core/MapBase.h b/Eigen/src/Core/MapBase.h index c923bc340..e79748e7d 100644 --- a/Eigen/src/Core/MapBase.h +++ b/Eigen/src/Core/MapBase.h @@ -66,11 +66,11 @@ template class MapBase inline const Scalar* data() const { return m_data; } template struct force_aligned_impl { - AlignedDerivedType static run(MapBase& a) { return a.derived(); } + static AlignedDerivedType run(MapBase& a) { return a.derived(); } }; template struct force_aligned_impl { - AlignedDerivedType static run(MapBase& a) { return a.derived()._convertToForceAligned(); } + static AlignedDerivedType run(MapBase& a) { return a.derived()._convertToForceAligned(); } }; /** \returns an expression equivalent to \c *this but having the \c PacketAccess constant diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 12d6f9a3a..7cadd343d 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -37,6 +37,10 @@ //classes inheriting ei_no_assignment_operator don't generate a default operator=. class ei_no_assignment_operator { +#if EIGEN_GCC3_OR_OLDER + protected: + void nevermind_this_is_just_to_work_around_a_stupid_gcc3_warning(); +#endif private: ei_no_assignment_operator& operator=(const ei_no_assignment_operator&); };