From 5aaf96a3827953744f38d993aa15b147efffb1a5 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 21 Jun 2022 22:38:17 -0700 Subject: [PATCH] Experiment: Try any C++17 compiler. --- include/pybind11/detail/type_caster_odr_guard.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/pybind11/detail/type_caster_odr_guard.h b/include/pybind11/detail/type_caster_odr_guard.h index 08bc78575..03e1c9467 100644 --- a/include/pybind11/detail/type_caster_odr_guard.h +++ b/include/pybind11/detail/type_caster_odr_guard.h @@ -6,7 +6,7 @@ #if !defined(PYBIND11_TYPE_CASTER_ODR_GUARD_ON) && !defined(PYBIND11_TYPE_CASTER_ODR_GUARD_OFF) \ && (defined(_MSC_VER) || defined(PYBIND11_CPP20) \ - || (defined(PYBIND11_CPP17) && defined(__clang__))) + || (defined(PYBIND11_CPP17) /* && defined(__clang__)*/)) # define PYBIND11_TYPE_CASTER_ODR_GUARD_ON #endif @@ -18,6 +18,10 @@ #else +# if defined(__GNUC__) && !defined(PYBIND11_CPP20) +# pragma GCC diagnostic ignored "-Wsubobject-linkage" +# endif + # include "common.h" # include "descr.h" # include "typeid.h"