Print this page
new smatch
*** 11,21 ****
[__builtin_offsetof(struct A, a[0*0])] = 0, // OK
[__builtin_offsetof(struct A, a[c])] = 0 // KO
};
/*
! * check-name: __builtin_offsetof() constness verification.
*
* check-error-start
constexpr-offsetof.c:12:39: error: bad constant expression
* check-error-end
*/
--- 11,21 ----
[__builtin_offsetof(struct A, a[0*0])] = 0, // OK
[__builtin_offsetof(struct A, a[c])] = 0 // KO
};
/*
! * check-name: constexprness __builtin_offsetof()
*
* check-error-start
constexpr-offsetof.c:12:39: error: bad constant expression
* check-error-end
*/