Print this page
new smatch
*** 15,25 ****
static int *n = &*(&b[1] + 1); // OK
static int *o = &*(b + 1); // OK
static int *p = &*(d + 1); // KO
/*
! * check-name: pointer arithmetic constness verification.
* check-command: sparse -Wconstexpr-not-const $file
*
* check-error-start
constexpr-pointer-arith.c:8:19: warning: non-constant initializer for static object
constexpr-pointer-arith.c:12:19: warning: non-constant initializer for static object
--- 15,25 ----
static int *n = &*(&b[1] + 1); // OK
static int *o = &*(b + 1); // OK
static int *p = &*(d + 1); // KO
/*
! * check-name: consrexprness pointer arithmetic
* check-command: sparse -Wconstexpr-not-const $file
*
* check-error-start
constexpr-pointer-arith.c:8:19: warning: non-constant initializer for static object
constexpr-pointer-arith.c:12:19: warning: non-constant initializer for static object