summaryrefslogtreecommitdiff
path: root/Examples/test-suite/typedef_struct.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/typedef_struct.i')
-rw-r--r--Examples/test-suite/typedef_struct.i7
1 files changed, 7 insertions, 0 deletions
diff --git a/Examples/test-suite/typedef_struct.i b/Examples/test-suite/typedef_struct.i
index 97456d9a6..185e81105 100644
--- a/Examples/test-suite/typedef_struct.i
+++ b/Examples/test-suite/typedef_struct.i
@@ -1,6 +1,13 @@
%module typedef_struct
%inline %{
+
+#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
+/* for anonymous enums */
+/* dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] */
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
typedef struct {
int numpoints;
} LineObj;