From 5d45055a58ea8c5cc4cbf714ea3968140e092152 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 21 Jun 2022 23:28:40 -0700 Subject: [PATCH] Fix ifdef for pragma GCC diagnostic. --- include/pybind11/detail/type_caster_odr_guard.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/pybind11/detail/type_caster_odr_guard.h b/include/pybind11/detail/type_caster_odr_guard.h index 03e1c9467..ede37337d 100644 --- a/include/pybind11/detail/type_caster_odr_guard.h +++ b/include/pybind11/detail/type_caster_odr_guard.h @@ -18,7 +18,8 @@ #else -# if defined(__GNUC__) && !defined(PYBIND11_CPP20) +# if !defined(PYBIND11_CPP20) && defined(__GNUC__) && !defined(__clang__) \ + && !defined(__INTEL_COMPILER) # pragma GCC diagnostic ignored "-Wsubobject-linkage" # endif