diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2017-02-06 20:12:40 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2017-02-06 20:30:09 +0000 |
commit | 760c00831168646502637be5e29cac2b55f5de22 (patch) | |
tree | 6c449fda73d1f3a852495bffcbd262e043abca7f /Examples/test-suite/throw_exception.i | |
parent | f5299fba8206d5b9e4398796bec13f20e53eeac4 (diff) | |
download | swig-760c00831168646502637be5e29cac2b55f5de22.tar.gz |
Warning fixes for gcc-7
warning: dynamic exception specifications are deprecated in C++11; use 'noexcept' instead [-Wdeprecated]
Diffstat (limited to 'Examples/test-suite/throw_exception.i')
-rw-r--r-- | Examples/test-suite/throw_exception.i | 12 |
1 files changed, 12 insertions, 0 deletions
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 +%} |