diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-31 20:57:44 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-31 20:57:44 +0000 |
commit | 6a7c94af983717e2c2d6aebe42cb4737c1c7b9e6 (patch) | |
tree | 6bf91b80cdb184e81bb3b7d4c606d789529f6ab0 /test/Sema/const-eval.c | |
parent | aa97b53175ef138144f69dbc7fda6870c5740226 (diff) |
Refactoring and test for r143360. Support for array rvalue to pointer decay is
needed for C++11, and will follow later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/const-eval.c')
-rw-r--r-- | test/Sema/const-eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Sema/const-eval.c b/test/Sema/const-eval.c index 8cfa7ea6f8..df56b06e48 100644 --- a/test/Sema/const-eval.c +++ b/test/Sema/const-eval.c @@ -92,3 +92,6 @@ double d2 = ++d; // expected-error {{not a compile-time constant}} int n = 2; int intLvalue[*(int*)((long)&n ?: 1)] = { 1, 2 }; // expected-error {{variable length array}} + +union u { int a; char b[4]; }; +char c = ((union u)(123456)).b[0]; // expected-error {{not a compile-time constant}} |