smatch_data/kernel.unreachable.ignore: add BUG(), WARN_ON() and others
[smatch.git] / validation / type-attribute-align.c
blob5f3db14aceb118ea432b6e02eb62f033f17fc951
1 #define __aligned(N) __attribute__((aligned(N)))
2 #define alignof(X) __alignof__(X)
4 struct s {
5 short a, b, c;
6 } __aligned(2*sizeof(short));
8 static int fs(void) { return sizeof(struct s); }
9 static int fa(void) { return alignof(struct s); }
11 void main(void)
13 _Static_assert( sizeof(struct s) == 4 * sizeof(short), "size");
14 _Static_assert(alignof(struct s) == 2 * sizeof(short), "alignment");
18 * check-name: type-attribute-align