any_t
is any type (int
, struct something
, …).
Consider this structure:
struct my_struct {
any_t val,
any_t array[10]
}
If I define a variable v
:
struct my_struct v;
Is it safe to use &v.val
as an array of 11 any_t
items?
any_t *p = &v.val;
f(p[0]);
f(p[5]);
f(p[10]);
Is it guaranteed no padding will be added between val
and array
?