00001 #ifndef EIGEN_WARNINGS_DISABLED 00002 #define EIGEN_WARNINGS_DISABLED 00003 00004 #ifdef _MSC_VER 00005 // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p)) 00006 // 4101 - unreferenced local variable 00007 // 4127 - conditional expression is constant 00008 // 4181 - qualifier applied to reference type ignored 00009 // 4211 - nonstandard extension used : redefined extern to static 00010 // 4244 - 'argument' : conversion from 'type1' to 'type2', possible loss of data 00011 // 4273 - QtAlignedMalloc, inconsistent DLL linkage 00012 // 4324 - structure was padded due to declspec(align()) 00013 // 4512 - assignment operator could not be generated 00014 // 4522 - 'class' : multiple assignment operators specified 00015 // 4700 - uninitialized local variable 'xyz' used 00016 // 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow 00017 #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 00018 #pragma warning( push ) 00019 #endif 00020 #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4512 4522 4700 4717 ) 00021 #elif defined __INTEL_COMPILER 00022 // 2196 - routine is both "inline" and "noinline" ("noinline" assumed) 00023 // ICC 12 generates this warning even without any inline keyword, when defining class methods 'inline' i.e. inside of class body 00024 // 2536 - type qualifiers are meaningless here 00025 // ICC 12 generates this warning when a function return type is const qualified, even if that type is a template-parameter-dependent 00026 // typedef that may be a reference type. 00027 // 279 - controlling expression is constant 00028 // ICC 12 generates this warning on assert(constant_expression_depending_on_template_params) and frankly this is a legitimate use case. 00029 #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 00030 #pragma warning push 00031 #endif 00032 #pragma warning disable 2196 2536 279 00033 #elif defined __clang__ 00034 // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant 00035 // this is really a stupid warning as it warns on compile-time expressions involving enums 00036 #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 00037 #pragma clang diagnostic push 00038 #endif 00039 #pragma clang diagnostic ignored "-Wconstant-logical-operand" 00040 #endif 00041 00042 #endif // not EIGEN_WARNINGS_DISABLED