diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
commit | 51fb8b013e7734b795139f49d3b1f77c539be20a (patch) | |
tree | 59e0e47a9831dcf0e21e547927c8ebb7e113bfd1 /test/Sema/offsetof.c | |
parent | 73490b890977362d28dd6326843a1ecae413921d (diff) |
Diffstat (limited to 'test/Sema/offsetof.c')
-rw-r--r-- | test/Sema/offsetof.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Sema/offsetof.c b/test/Sema/offsetof.c index f8b9fed03c3c1..dfae99216f8a1 100644 --- a/test/Sema/offsetof.c +++ b/test/Sema/offsetof.c @@ -48,3 +48,9 @@ int a[__builtin_offsetof(struct sockaddr_un, sun_path[len+1])]; // PR4079 union x {struct {int x;};}; int x[__builtin_offsetof(union x, x)]; + +// rdar://problem/7222956 +struct incomplete; // expected-note 2 {{forward declaration of 'struct incomplete'}} +int test1[__builtin_offsetof(struct incomplete, foo)]; // expected-error {{offsetof of incomplete type 'struct incomplete'}} + +int test1[__builtin_offsetof(struct incomplete[10], [4].foo)]; // expected-error {{array has incomplete element type 'struct incomplete'}} |