From 760c00831168646502637be5e29cac2b55f5de22 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 6 Feb 2017 20:12:40 +0000 Subject: Warning fixes for gcc-7 warning: dynamic exception specifications are deprecated in C++11; use 'noexcept' instead [-Wdeprecated] --- Examples/test-suite/throw_exception.i | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Examples/test-suite/throw_exception.i') diff --git a/Examples/test-suite/throw_exception.i b/Examples/test-suite/throw_exception.i index 396c633a6..777e55b9e 100644 --- a/Examples/test-suite/throw_exception.i +++ b/Examples/test-suite/throw_exception.i @@ -4,6 +4,10 @@ #if defined(_MSC_VER) #pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) #endif +#if __GNUC__ >= 7 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated" // dynamic exception specifications are deprecated in C++11 +#endif %} %warnfilter(SWIGWARN_RUBY_WRONG_NAME) Namespace::enum1; @@ -77,3 +81,11 @@ public: %} +%{ +#if defined(_MSC_VER) + #pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) +#endif +#if __GNUC__ >= 7 + #pragma GCC diagnostic pop +#endif +%} -- cgit v1.2.1