|
10 | 10 |
|
11 | 11 | #pragma once
|
12 | 12 |
|
13 |
| -#if defined(_MSC_VER) |
| 13 | +#if defined(__INTEL_COMPILER) |
| 14 | +# pragma warning push |
| 15 | +# pragma warning disable 68 // integer conversion resulted in a change of sign |
| 16 | +# pragma warning disable 186 // pointless comparison of unsigned integer with zero |
| 17 | +# pragma warning disable 878 // incompatible exception specifications |
| 18 | +# pragma warning disable 1334 // the "template" keyword used for syntactic disambiguation may only be used within a template |
| 19 | +# pragma warning disable 1682 // implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem) |
| 20 | +# pragma warning disable 1786 // function "strdup" was declared deprecated |
| 21 | +# pragma warning disable 1875 // offsetof applied to non-POD (Plain Old Data) types is nonstandard |
| 22 | +# pragma warning disable 2196 // warning #2196: routine is both "inline" and "noinline" |
| 23 | +#elif defined(_MSC_VER) |
14 | 24 | # pragma warning(push)
|
15 | 25 | # pragma warning(disable: 4100) // warning C4100: Unreferenced formal parameter
|
16 | 26 | # pragma warning(disable: 4127) // warning C4127: Conditional expression is constant
|
|
19 | 29 | # pragma warning(disable: 4996) // warning C4996: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name
|
20 | 30 | # pragma warning(disable: 4702) // warning C4702: unreachable code
|
21 | 31 | # pragma warning(disable: 4522) // warning C4522: multiple assignment operators specified
|
22 |
| -#elif defined(__INTEL_COMPILER) |
23 |
| -# pragma warning(push) |
24 |
| -# pragma warning(disable: 68) // integer conversion resulted in a change of sign |
25 |
| -# pragma warning(disable: 186) // pointless comparison of unsigned integer with zero |
26 |
| -# pragma warning(disable: 878) // incompatible exception specifications |
27 |
| -# pragma warning(disable: 1334) // the "template" keyword used for syntactic disambiguation may only be used within a template |
28 |
| -# pragma warning(disable: 1682) // implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem) |
29 |
| -# pragma warning(disable: 1875) // offsetof applied to non-POD (Plain Old Data) types is nonstandard |
30 |
| -# pragma warning(disable: 2196) // warning #2196: routine is both "inline" and "noinline" |
31 | 32 | #elif defined(__GNUG__) && !defined(__clang__)
|
32 | 33 | # pragma GCC diagnostic push
|
33 | 34 | # pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
|
@@ -2077,10 +2078,8 @@ template <class T> function get_overload(const T *this_ptr, const char *name) {
|
2077 | 2078 |
|
2078 | 2079 | NAMESPACE_END(PYBIND11_NAMESPACE)
|
2079 | 2080 |
|
2080 |
| -#if defined(_MSC_VER) |
| 2081 | +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) |
2081 | 2082 | # pragma warning(pop)
|
2082 |
| -#elif defined(__INTEL_COMPILER) |
2083 |
| -/* Leave ignored warnings on */ |
2084 | 2083 | #elif defined(__GNUG__) && !defined(__clang__)
|
2085 | 2084 | # pragma GCC diagnostic pop
|
2086 | 2085 | #endif
|
0 commit comments