diff options
Diffstat (limited to 'test/Sema/anonymous-struct-union.c')
-rw-r--r-- | test/Sema/anonymous-struct-union.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Sema/anonymous-struct-union.c b/test/Sema/anonymous-struct-union.c index d88abc3c3b..e0822901b0 100644 --- a/test/Sema/anonymous-struct-union.c +++ b/test/Sema/anonymous-struct-union.c @@ -102,3 +102,9 @@ typedef struct { int x; } a_struct; int tmp = (a_struct) { .x = 0 }; // expected-error {{initializing 'int' with an expression of incompatible type 'a_struct'}} + +// This example comes out of the C11 standard; make sure we don't accidentally reject it. +struct s { + struct { int i; }; + int a[]; +}; |