aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/pointer-addition.c
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-06-27 16:32:27 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-06-27 16:32:27 +0000
commit6628969c3e3886b68d8a0051df7e222aa50ef118 (patch)
tree7d381cd266ec5725a3638002d13544eb1cefb613 /test/Sema/pointer-addition.c
parentd944a9b7a680be2ce74aa9398e0604fdebf0338a (diff)
Cleanup a fixme by using a specific diagnostic for subscripting
a pointer to void. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/pointer-addition.c')
-rw-r--r--test/Sema/pointer-addition.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Sema/pointer-addition.c b/test/Sema/pointer-addition.c
index af8258a0f2..21ce63b438 100644
--- a/test/Sema/pointer-addition.c
+++ b/test/Sema/pointer-addition.c
@@ -9,7 +9,7 @@ void a(S* b, void* c) {
c += 1; // expected-warning {{arithmetic on a pointer to void is a GNU extension}}
c--; // expected-warning {{arithmetic on a pointer to void is a GNU extension}}
c -= 1; // expected-warning {{arithmetic on a pointer to void is a GNU extension}}
- (void) c[1]; // expected-warning {{arithmetic on a pointer to void is a GNU extension}}
+ (void) c[1]; // expected-warning {{subscript of a pointer to void is a GNU extension}}
b = 1+b; // expected-error {{arithmetic on a pointer to an incomplete type}}
/* The next couple tests are only pedantic warnings in gcc */
void (*d)(S*,void*) = a;