expressions: make assign_expression() take an op argument
[smatch.git] / validation / type-attribute-align.c
blob473177c56265da3459168d387df95fdc4e847b0b
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