diff options
Diffstat (limited to 'test/SemaCXX/flexible-array-test.cpp')
-rw-r--r-- | test/SemaCXX/flexible-array-test.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/flexible-array-test.cpp b/test/SemaCXX/flexible-array-test.cpp index 02e3f83..95d8bb1 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 []'}} +}; |