This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
View | Details | Raw Unified | Return to bug 1221
Collapse All | Expand All

(-)a/Eigen/src/Core/util/DisableStupidWarnings.h (+8 lines)
Lines 36-51 Link Here
36
36
37
#elif defined __clang__
37
#elif defined __clang__
38
  // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant
38
  // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant
39
  //     this is really a stupid warning as it warns on compile-time expressions involving enums
39
  //     this is really a stupid warning as it warns on compile-time expressions involving enums
40
  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
40
  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
41
    #pragma clang diagnostic push
41
    #pragma clang diagnostic push
42
  #endif
42
  #endif
43
  #pragma clang diagnostic ignored "-Wconstant-logical-operand"
43
  #pragma clang diagnostic ignored "-Wconstant-logical-operand"
44
45
#elif defined __GNUC__ && __GNUC__>=6
46
47
  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
48
    #pragma GCC diagnostic push
49
  #endif
50
  #pragma GCC diagnostic ignored "-Wignored-attributes"
51
44
#endif
52
#endif
45
53
46
#if defined __NVCC__
54
#if defined __NVCC__
47
  // Disable the "statement is unreachable" message
55
  // Disable the "statement is unreachable" message
48
  #pragma diag_suppress code_is_unreachable
56
  #pragma diag_suppress code_is_unreachable
49
  // Disable the "dynamic initialization in unreachable code" message
57
  // Disable the "dynamic initialization in unreachable code" message
50
  #pragma diag_suppress initialization_not_reachable
58
  #pragma diag_suppress initialization_not_reachable
51
  // Disable the "calling a __host__ function from a __host__ __device__ function is not allowed" messages (yes, there are 4 of them)
59
  // Disable the "calling a __host__ function from a __host__ __device__ function is not allowed" messages (yes, there are 4 of them)
(-)a/Eigen/src/Core/util/ReenableStupidWarnings.h (+3 lines)
Lines 3-24 Link Here
3
3
4
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
4
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
5
  #ifdef _MSC_VER
5
  #ifdef _MSC_VER
6
    #pragma warning( pop )
6
    #pragma warning( pop )
7
  #elif defined __INTEL_COMPILER
7
  #elif defined __INTEL_COMPILER
8
    #pragma warning pop
8
    #pragma warning pop
9
  #elif defined __clang__
9
  #elif defined __clang__
10
    #pragma clang diagnostic pop
10
    #pragma clang diagnostic pop
11
  #elif defined __GNUC__ && __GNUC__>=6
12
    #pragma GCC diagnostic pop
11
  #endif
13
  #endif
12
14
13
  #if defined __NVCC__
15
  #if defined __NVCC__
14
//    Don't reenable the diagnostic messages, as it turns out these messages need
16
//    Don't reenable the diagnostic messages, as it turns out these messages need
15
//    to be disabled at the point of the template instantiation (i.e the user code)
17
//    to be disabled at the point of the template instantiation (i.e the user code)
16
//    otherwise they'll be triggeredby nvcc.
18
//    otherwise they'll be triggeredby nvcc.
17
//    #pragma diag_default code_is_unreachable
19
//    #pragma diag_default code_is_unreachable
18
//    #pragma diag_default initialization_not_reachable
20
//    #pragma diag_default initialization_not_reachable
19
//    #pragma diag_default 2651
21
//    #pragma diag_default 2651
20
//    #pragma diag_default 2653
22
//    #pragma diag_default 2653
21
  #endif
23
  #endif
24
22
#endif
25
#endif
23
26
24
#endif // EIGEN_WARNINGS_DISABLED
27
#endif // EIGEN_WARNINGS_DISABLED

Return to bug 1221