diff options
author | Anders Carlsson <andersca@mac.com> | 2008-02-01 07:15:58 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-02-01 07:15:58 +0000 |
commit | 806700f9738a09c8ddee7e466d8429eda9d7ee66 (patch) | |
tree | 66659403cd3b330c114525d1f2cccef72530272f /clang/test/Sema/expr-address-of.c | |
parent | a34783486980e8b3929a5314fee55e89f0c84bac (diff) | |
download | bcm5719-llvm-806700f9738a09c8ddee7e466d8429eda9d7ee66.tar.gz bcm5719-llvm-806700f9738a09c8ddee7e466d8429eda9d7ee66.zip |
It is allowed to get the address of an array subscript, even if the array has the register qualifier, if the array is really a pointer.
llvm-svn: 46634
Diffstat (limited to 'clang/test/Sema/expr-address-of.c')
-rw-r--r-- | clang/test/Sema/expr-address-of.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Sema/expr-address-of.c b/clang/test/Sema/expr-address-of.c index f085b6012a0..5f46b630467 100644 --- a/clang/test/Sema/expr-address-of.c +++ b/clang/test/Sema/expr-address-of.c @@ -10,6 +10,11 @@ void test() { void foo() { register int x[10]; &x[10]; // expected-error {{address of register variable requested}} + + register int *y; + + int *x2 = &y; // expected-error {{address of register variable requested}} + int *x3 = &y[10]; } |