slice: remove unneeded nr_nrbits from EXPR_SLICE
[smatch.git] / validation / enum-bitwise-mixed.c
blob07d77176c64fa858793a2f61c670c2191aab7864
1 #define __bitwise __attribute__((bitwise))
2 #define __force __attribute__((force))
4 typedef long long __bitwise bits;
6 enum a {
7 AR = (__force bits) 0,
8 AP = 0,
9 AS = (__force bits) 1,
10 AQ = 1,
12 _Static_assert(sizeof(AP) == sizeof(int), "is bad?");
14 enum b {
15 BP = 0,
16 BR = (__force bits) 0,
17 BQ = 1,
18 BS = (__force bits) 1,
20 _Static_assert(sizeof(BP) == sizeof(int), "is bad?");
23 * check-name: enum-bitwise-mixed
25 * check-error-start
26 enum-bitwise-mixed.c:8:14: warning: mixed bitwiseness
27 enum-bitwise-mixed.c:16:15: warning: mixed bitwiseness
28 * check-error-end