DisableStupidWarnings.h
Go to the documentation of this file.
1 #ifndef EIGEN_WARNINGS_DISABLED
2 #define EIGEN_WARNINGS_DISABLED
3 
4 #ifdef _MSC_VER
5  // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p))
6  // 4101 - unreferenced local variable
7  // 4127 - conditional expression is constant
8  // 4181 - qualifier applied to reference type ignored
9  // 4211 - nonstandard extension used : redefined extern to static
10  // 4244 - 'argument' : conversion from 'type1' to 'type2', possible loss of data
11  // 4273 - QtAlignedMalloc, inconsistent DLL linkage
12  // 4324 - structure was padded due to declspec(align())
13  // 4512 - assignment operator could not be generated
14  // 4522 - 'class' : multiple assignment operators specified
15  // 4700 - uninitialized local variable 'xyz' used
16  // 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow
17  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
18  #pragma warning( push )
19  #endif
20  #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4512 4522 4700 4717 )
21 #elif defined __INTEL_COMPILER
22  // 2196 - routine is both "inline" and "noinline" ("noinline" assumed)
23  // ICC 12 generates this warning even without any inline keyword, when defining class methods 'inline' i.e. inside of class body
24  // typedef that may be a reference type.
25  // 279 - controlling expression is constant
26  // ICC 12 generates this warning on assert(constant_expression_depending_on_template_params) and frankly this is a legitimate use case.
27  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
28  #pragma warning push
29  #endif
30  #pragma warning disable 2196 279
31 #elif defined __clang__
32  // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant
33  // this is really a stupid warning as it warns on compile-time expressions involving enums
34  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
35  #pragma clang diagnostic push
36  #endif
37  #pragma clang diagnostic ignored "-Wconstant-logical-operand"
38 #endif
39 
40 #endif // not EIGEN_WARNINGS_DISABLED


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:32