|
4 | 4 | #ifdef _MSC_VER |
5 | 5 | // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p)) |
6 | 6 | // 4101 - unreferenced local variable |
7 | | - // 4127 - conditional expression is constant |
8 | 7 | // 4181 - qualifier applied to reference type ignored |
9 | 8 | // 4211 - nonstandard extension used : redefined extern to static |
10 | 9 | // 4244 - 'argument' : conversion from 'type1' to 'type2', possible loss of data |
|
20 | 19 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS |
21 | 20 | #pragma warning( push ) |
22 | 21 | #endif |
23 | | - #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4503 4512 4522 4700 4714 4717 4800) |
| 22 | + #pragma warning( disable : 4100 4101 4181 4211 4244 4273 4324 4503 4512 4522 4700 4714 4717 4800) |
24 | 23 |
|
25 | 24 | #elif defined __INTEL_COMPILER |
26 | 25 | // 2196 - routine is both "inline" and "noinline" ("noinline" assumed) |
|
38 | 37 | #elif defined __clang__ |
39 | 38 | // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant |
40 | 39 | // this is really a stupid warning as it warns on compile-time expressions involving enums |
41 | | - #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS |
42 | | - #pragma clang diagnostic push |
43 | | - #endif |
44 | | - #pragma clang diagnostic ignored "-Wconstant-logical-operand" |
| 40 | + //#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS |
| 41 | + // #pragma clang diagnostic push |
| 42 | + //#endif |
| 43 | + //#pragma clang diagnostic ignored "-Wconstant-logical-operand" |
45 | 44 |
|
46 | 45 | #elif defined __GNUC__ |
47 | 46 |
|
48 | | - #if (!defined(EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS)) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) |
49 | | - #pragma GCC diagnostic push |
50 | | - #endif |
51 | | - // g++ warns about local variables shadowing member functions, which is too strict |
52 | | - #pragma GCC diagnostic ignored "-Wshadow" |
53 | | - #if __GNUC__ == 4 && __GNUC_MINOR__ < 8 |
54 | | - // Until g++-4.7 there are warnings when comparing unsigned int vs 0, even in templated functions: |
55 | | - #pragma GCC diagnostic ignored "-Wtype-limits" |
56 | | - #endif |
57 | | - #if __GNUC__>=6 |
58 | | - #pragma GCC diagnostic ignored "-Wignored-attributes" |
59 | | - #endif |
60 | | - #if __GNUC__==7 |
61 | | - // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325 |
62 | | - #pragma GCC diagnostic ignored "-Wattributes" |
63 | | - #endif |
| 47 | + // #if (!defined(EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS)) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) |
| 48 | + // #pragma GCC diagnostic push |
| 49 | + // #endif |
| 50 | + // // g++ warns about local variables shadowing member functions, which is too strict |
| 51 | + // #pragma GCC diagnostic ignored "-Wshadow" |
| 52 | + // #if __GNUC__ == 4 && __GNUC_MINOR__ < 8 |
| 53 | + // // Until g++-4.7 there are warnings when comparing unsigned int vs 0, even in templated functions: |
| 54 | + // #pragma GCC diagnostic ignored "-Wtype-limits" |
| 55 | + // #endif |
| 56 | + // #if __GNUC__>=6 |
| 57 | + // #pragma GCC diagnostic ignored "-Wignored-attributes" |
| 58 | + // #endif |
| 59 | + // #if __GNUC__==7 |
| 60 | + // // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325 |
| 61 | + // #pragma GCC diagnostic ignored "-Wattributes" |
| 62 | + // #endif |
64 | 63 | #endif |
65 | 64 |
|
66 | 65 | #if defined __NVCC__ |
| 66 | + #pragma diag_suppress boolean_controlling_expr_is_constant |
67 | 67 | // Disable the "statement is unreachable" message |
68 | 68 | #pragma diag_suppress code_is_unreachable |
69 | 69 | // Disable the "dynamic initialization in unreachable code" message |
|
81 | 81 | #pragma diag_suppress 2671 |
82 | 82 | #pragma diag_suppress 2735 |
83 | 83 | #pragma diag_suppress 2737 |
| 84 | + #pragma diag_suppress 2739 |
84 | 85 | #endif |
85 | 86 |
|
86 | 87 | #else |
|
0 commit comments