diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2008-09-01 22:28:55 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2008-09-01 22:28:55 +0000 |
commit | 62b6a65f0bef3ada0d8bac1a98f7e0769e6e8ffb (patch) | |
tree | c6eea31e39e467e1be4e114705ed4bf7d24c2a62 /test/Sema/array-init.c | |
parent | 6d4abe1eee550411524ca002025fdf0490eefd26 (diff) |
readd test as it passes correctly. nice, but weird
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55615 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/array-init.c')
-rw-r--r-- | test/Sema/array-init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c index 6494b9593e..bf3d83d265 100644 --- a/test/Sema/array-init.c +++ b/test/Sema/array-init.c @@ -222,5 +222,19 @@ struct {int:5;} x[] = {6}; //expected-error{{initializer for aggregate with no e struct {int a; int:5;} noNamedImplicit[] = {1,2,3}; int noNamedImplicitCheck[sizeof(noNamedImplicit) == 3 * sizeof(*noNamedImplicit) ? 1 : -1]; + +// ptrs are constant +struct soft_segment_descriptor { + int ssd_base; +}; +static int dblfault_tss; + +union uniao { int ola; } xpto[1]; + +struct soft_segment_descriptor gdt_segs[] = { + {(int) &dblfault_tss}, + { (int)xpto}, +}; + static void sppp_ipv6cp_up(); const struct {} ipcp = { sppp_ipv6cp_up }; //expected-warning{{empty struct extension}} expected-warning{{excess elements in array initializer}} |