aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/c99-flex-array-5.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/c99-flex-array-5.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/c99-flex-array-5.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/c99-flex-array-5.c b/gcc-4.9/gcc/testsuite/gcc.dg/c99-flex-array-5.c
new file mode 100644
index 000000000..385b0cb95
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/c99-flex-array-5.c
@@ -0,0 +1,6 @@
+/* Test for flexible array members: not permitted in unions. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+union u { int a; char b[]; }; /* { dg-error "flexible array member in union" } */