summaryrefslogtreecommitdiff
path: root/Examples/test-suite/nested_structs.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/nested_structs.i')
-rw-r--r--Examples/test-suite/nested_structs.i12
1 files changed, 12 insertions, 0 deletions
diff --git a/Examples/test-suite/nested_structs.i b/Examples/test-suite/nested_structs.i
index f4f7a275a..c70924958 100644
--- a/Examples/test-suite/nested_structs.i
+++ b/Examples/test-suite/nested_structs.i
@@ -1,5 +1,17 @@
%module nested_structs
+#if defined(SWIG_JAVASCRIPT_V8)
+
+%inline %{
+#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
+/* for nested C class wrappers compiled as C++ code */
+/* dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] */
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+%}
+
+#endif
+
// bug #491476
%inline %{
struct Outer {