diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2008-09-01 14:47:06 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2008-09-01 14:47:06 +0000 |
commit | f7e37ce8400d5ba3b0613116034aaa30e6a70b3e (patch) | |
tree | ba53417a855865938d6c47b95da1cb3d9965cd69 /test/Sema/array-init.c | |
parent | b381aac9bae6d608c72267dd0ed08ec6369e94e4 (diff) |
make CheckArithmeticConstantExpression() aware of &foo and pointers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/array-init.c')
-rw-r--r-- | test/Sema/array-init.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c index 24a0070c1f..7d6e6c6d28 100644 --- a/test/Sema/array-init.c +++ b/test/Sema/array-init.c @@ -222,3 +222,16 @@ 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}, +}; |