Skip to content

Commit

Permalink
update integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
wrongnull committed Sep 30, 2024
1 parent a86f96b commit 71330d9
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions test/cases/gnu pointer arith.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
//aro-args -Wgnu-pointer-arith

#include <stddef.h>
ptrdiff_t foo(void *a, void *b) {
return b - a;
void foo(void *a, void *b) {
b - a;
a - 1;
a + 1;
++a;
--a;
b++;
b--;
}

#define EXPECTED_ERRORS "gnu pointer arith.c:5:14: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"
#define EXPECTED_ERRORS "gnu pointer arith.c:4:7: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"\
"gnu pointer arith.c:5:7: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"\
"gnu pointer arith.c:6:7: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"\
"gnu pointer arith.c:7:5: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"\
"gnu pointer arith.c:8:5: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"\
"gnu pointer arith.c:9:6: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"\
"gnu pointer arith.c:10:6: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"

0 comments on commit 71330d9

Please sign in to comment.