From 88ebc49be6594a4857ed85c77c5480b7eea31bcc Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Tue, 9 May 2017 13:39:26 -0400 Subject: [PATCH] gcc 7 disable warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 7 generates (when compiling in C++11/14 mode) warnings such as: mangled name for ‘pybind11::class_& pybind11::class_::def(const char*, Func&&, const Extra& ...) [with Func = int (test_exc_sp::C::*)(int) noexcept; Extra = {}; type_ = test_exc_sp::C; options = {}]’ will change in C++17 because the exception specification is part of a function type [-Wnoexcept-type] There's nothing we can actually do in the code to avoid this, so just disable the warning. --- include/pybind11/pybind11.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 79d02683..75d7be46 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -31,6 +31,7 @@ # pragma GCC diagnostic ignored "-Wmissing-field-initializers" # pragma GCC diagnostic ignored "-Wstrict-aliasing" # pragma GCC diagnostic ignored "-Wattributes" +# pragma GCC diagnostic ignored "-Wnoexcept-type" #endif #include "attr.h"