summaryrefslogtreecommitdiff
path: root/Examples/test-suite/li_std_wstring.i
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2017-02-06 20:12:40 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2017-02-06 20:30:09 +0000
commit760c00831168646502637be5e29cac2b55f5de22 (patch)
tree6c449fda73d1f3a852495bffcbd262e043abca7f /Examples/test-suite/li_std_wstring.i
parentf5299fba8206d5b9e4398796bec13f20e53eeac4 (diff)
downloadswig-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/li_std_wstring.i')
-rw-r--r--Examples/test-suite/li_std_wstring.i7
1 files changed, 7 insertions, 0 deletions
diff --git a/Examples/test-suite/li_std_wstring.i b/Examples/test-suite/li_std_wstring.i
index 80f860338..3c2d6f183 100644
--- a/Examples/test-suite/li_std_wstring.i
+++ b/Examples/test-suite/li_std_wstring.i
@@ -81,6 +81,10 @@ std::wstring& test_reference_out() {
#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
void test_throw() throw(std::wstring){
static std::wstring x = L"x";
@@ -91,6 +95,9 @@ void test_throw() throw(std::wstring){
#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
#ifdef SWIGPYTHON_BUILTIN
bool is_python_builtin() { return true; }