From 71330d9836f3f0addf721503135f5db5e3b4d1b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D0=B3=D0=B4=D0=B0=D0=BD=20=D0=A0=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D1=8E=D0=BA?= Date: Mon, 30 Sep 2024 23:49:08 +0300 Subject: [PATCH] update integration test --- test/cases/gnu pointer arith.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/test/cases/gnu pointer arith.c b/test/cases/gnu pointer arith.c index f8f7e1b1..1c1fd984 100644 --- a/test/cases/gnu pointer arith.c +++ b/test/cases/gnu pointer arith.c @@ -1,8 +1,19 @@ //aro-args -Wgnu-pointer-arith -#include -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]"