Disable -Wshadow when compiling with g++

This commit is contained in:
Christoph Hertzberg
2018-04-21 22:08:26 +02:00
parent 686fb57233
commit 34e499ad36
3 changed files with 8 additions and 8 deletions

View File

@@ -45,12 +45,16 @@
#pragma clang diagnostic ignored "-Wabsolute-value"
#endif
#elif defined __GNUC__ && __GNUC__>=6
#elif defined __GNUC__
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
#pragma GCC diagnostic push
#endif
#pragma GCC diagnostic ignored "-Wignored-attributes"
// g++ warns about local variables shadowing member functions, which is too strict
#pragma GCC diagnostic ignored "-Wshadow"
#if __GNUC__>=6
#pragma GCC diagnostic ignored "-Wignored-attributes"
#endif
#endif

View File

@@ -8,7 +8,7 @@
#pragma warning pop
#elif defined __clang__
#pragma clang diagnostic pop
#elif defined __GNUC__ && __GNUC__>=6
#elif defined __GNUC__
#pragma GCC diagnostic pop
#endif