diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
commit | 5e20cdd81c44a443562a09007668ffdf76c455af (patch) | |
tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /test/Sema/pointer-addition.c | |
parent | d5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff) |
Notes
Diffstat (limited to 'test/Sema/pointer-addition.c')
-rw-r--r-- | test/Sema/pointer-addition.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/Sema/pointer-addition.c b/test/Sema/pointer-addition.c index 21ce63b4381fc..667fe9a68c153 100644 --- a/test/Sema/pointer-addition.c +++ b/test/Sema/pointer-addition.c @@ -1,6 +1,7 @@ -// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic -std=c11 -typedef struct S S; // expected-note 3 {{forward declaration of 'struct S'}} +typedef struct S S; // expected-note 4 {{forward declaration of 'struct S'}} +extern _Atomic(S*) e; void a(S* b, void* c) { void (*fp)(int) = 0; b++; // expected-error {{arithmetic on a pointer to an incomplete type}} @@ -18,4 +19,5 @@ void a(S* b, void* c) { d--; // expected-warning {{arithmetic on a pointer to the function type 'void (S *, void *)' is a GNU extension}} d -= 1; // expected-warning {{arithmetic on a pointer to the function type 'void (S *, void *)' is a GNU extension}} (void)(1 + d); // expected-warning {{arithmetic on a pointer to the function type 'void (S *, void *)' is a GNU extension}} + e++; // expected-error {{arithmetic on a pointer to an incomplete type}} } |