diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 0688a31dc..8cffb3829 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -18,6 +18,7 @@ # pragma warning(disable: 4100) // warning C4100: Unreferenced formal parameter # pragma warning(disable: 4512) // warning C4512: Assignment operator was implicitly defined as deleted #elif defined(__ICC) || defined(__INTEL_COMPILER) +# pragma warning(push) # pragma warning(disable:2196) // warning #2196: routine is both "inline" and "noinline" #elif defined(__GNUG__) and !defined(__clang__) # pragma GCC diagnostic push @@ -1056,6 +1057,8 @@ NAMESPACE_END(pybind11) #if defined(_MSC_VER) # pragma warning(pop) +#elif defined(__ICC) || defined(__INTEL_COMPILER) +# pragma warning(pop) #elif defined(__GNUG__) and !defined(__clang__) # pragma GCC diagnostic pop #endif