summaryrefslogtreecommitdiff
path: root/test/SemaCXX/flexible-array-test.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-09-17 15:54:40 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-09-17 15:54:40 +0000
commit3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f (patch)
tree0bbe07708f7571f8b5291f6d7b96c102b7c99dee /test/SemaCXX/flexible-array-test.cpp
parenta0482fa4e7fa27b01184f938097f0666b78016dd (diff)
Diffstat (limited to 'test/SemaCXX/flexible-array-test.cpp')
-rw-r--r--test/SemaCXX/flexible-array-test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/flexible-array-test.cpp b/test/SemaCXX/flexible-array-test.cpp
index 02e3f83974e28..95d8bb1aa4135 100644
--- a/test/SemaCXX/flexible-array-test.cpp
+++ b/test/SemaCXX/flexible-array-test.cpp
@@ -43,3 +43,13 @@ struct X {
int blah;
S strings[]; // expected-error {{flexible array member 'strings' of non-POD element type 'S []'}}
};
+
+class A {
+ int s;
+ char c[];
+};
+
+union B {
+ int s;
+ char c[]; // expected-error {{field has incomplete type 'char []'}}
+};