From d15b217f1abc1b9bf8bdc904772175bee6d6c77e Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Tue, 9 May 2017 14:46:15 -0400 Subject: [PATCH] Only disable -Wnoexcept-type on gcc >= 7 --- include/pybind11/pybind11.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 75d7be465..f00c0f9f9 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -31,7 +31,9 @@ # pragma GCC diagnostic ignored "-Wmissing-field-initializers" # pragma GCC diagnostic ignored "-Wstrict-aliasing" # pragma GCC diagnostic ignored "-Wattributes" -# pragma GCC diagnostic ignored "-Wnoexcept-type" +# if __GNUC__ >= 7 +# pragma GCC diagnostic ignored "-Wnoexcept-type" +# endif #endif #include "attr.h"