summaryrefslogtreecommitdiff
path: root/Examples/python
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/python
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/python')
-rw-r--r--Examples/python/exception/example.h7
-rw-r--r--Examples/python/exceptproxy/example.h7
2 files changed, 14 insertions, 0 deletions
diff --git a/Examples/python/exception/example.h b/Examples/python/exception/example.h
index 8f9a977b0..ea3b4fc63 100644
--- a/Examples/python/exception/example.h
+++ b/Examples/python/exception/example.h
@@ -19,6 +19,10 @@ public:
#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
class Test {
public:
@@ -50,4 +54,7 @@ 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
diff --git a/Examples/python/exceptproxy/example.h b/Examples/python/exceptproxy/example.h
index ec7107a5e..0c03873fc 100644
--- a/Examples/python/exceptproxy/example.h
+++ b/Examples/python/exceptproxy/example.h
@@ -11,6 +11,10 @@ class FullError {
#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
template<typename T> class Queue {
int maxsize;
@@ -51,4 +55,7 @@ template<typename T> class Queue {
#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