PageRenderTime 40ms CodeModel.GetById 35ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/Geometry_Eigen/Eigen/src/Core/util/DisableStupidWarnings.h

http://github.com/Akranar/daguerreo
C Header | 42 lines | 19 code | 2 blank | 21 comment | 0 complexity | 963379330c1953d16f5a7f0af9948163 MD5 | raw file
Possible License(s): AGPL-3.0, LGPL-2.1, LGPL-3.0, GPL-2.0
 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  // 2536 - type qualifiers are meaningless here
25  //        ICC 12 generates this warning when a function return type is const qualified, even if that type is a template-parameter-dependent
26  //        typedef that may be a reference type.
27  // 279  - controlling expression is constant
28  //        ICC 12 generates this warning on assert(constant_expression_depending_on_template_params) and frankly this is a legitimate use case.
29  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
30    #pragma warning push
31  #endif
32  #pragma warning disable 2196 2536 279
33#elif defined __clang__
34  // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant
35  //     this is really a stupid warning as it warns on compile-time expressions involving enums
36  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
37    #pragma clang diagnostic push
38  #endif
39  #pragma clang diagnostic ignored "-Wconstant-logical-operand"
40#endif
41
42#endif // not EIGEN_WARNINGS_DISABLED