diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2010-09-13 06:50:07 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2010-09-13 06:50:07 +0000 |
commit | 46358457f712a8da89d4e03a17a1d44d35c78b77 (patch) | |
tree | a831b740191de3b3ad81031878f5a6c54e30b5ac /test/Sema/pointer-addition.c | |
parent | 2c5399f99c95b831fa90fd3a3c1d9719c1dd9441 (diff) |
Congruent diagnostic for void* arithmetic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/pointer-addition.c')
-rw-r--r-- | test/Sema/pointer-addition.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/Sema/pointer-addition.c b/test/Sema/pointer-addition.c index 34f8bbbfcd..aa425a7fd9 100644 --- a/test/Sema/pointer-addition.c +++ b/test/Sema/pointer-addition.c @@ -9,6 +9,7 @@ void a(S* b, void* c) { c += 1; // expected-warning {{use of GNU void* extension}} c--; // expected-warning {{use of GNU void* extension}} c -= 1; // expected-warning {{use of GNU void* extension}} + (void) c[1]; // expected-warning {{use of GNU void* extension}} b = 1+b; // expected-error {{arithmetic on pointer to incomplete type}} /* The next couple tests are only pedantic warnings in gcc */ void (*d)(S*,void*) = a; |