diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-10-07 09:23:15 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-10-07 09:23:15 +0200 |
commit | 409132bb817f2a3f77e0a0ecb9baeb73af386984 (patch) | |
tree | 92936966baf08918d7545993b5e8470a8dd09485 /test/stdvector.cpp | |
parent | c6a1ab4036afff63fd92a15f15490a38c06bab4c (diff) |
Workaround gcc bug making it trigger an invalid warning
Diffstat (limited to 'test/stdvector.cpp')
-rw-r--r-- | test/stdvector.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/stdvector.cpp b/test/stdvector.cpp index e2b7bd061..9a7040874 100644 --- a/test/stdvector.cpp +++ b/test/stdvector.cpp @@ -117,6 +117,16 @@ void check_stdvector_quaternion(const QuaternionType&) } } +// the code below triggered an invalid warning with gcc >= 7 +// eigen/Eigen/src/Core/util/Memory.h:189:12: warning: argument 1 value '18446744073709551612' exceeds maximum object size 9223372036854775807 +// This has been reported to gcc there: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87544 +void std_vector_gcc_warning() +{ + typedef Eigen::Vector3f T; + std::vector<T, Eigen::aligned_allocator<T> > v; + v.push_back(T()); +} + EIGEN_DECLARE_TEST(stdvector) { // some non vectorizable fixed sizes |