db/fixup_kernel.sh: update vfs_write() code
[smatch.git] / validation / enum-bitwise-bad.c
blob6d31ca38c034dc1b8e4863cab79e65dbaaaa0156
1 #define __bitwise __attribute__((bitwise))
2 #define __force __attribute__((force))
4 typedef int __bitwise apple_t;
5 typedef int __bitwise orange_t;
7 enum fruit {
8 A = (__force apple_t) 0,
9 B = (__force orange_t) 1,
13 * check-name: enum-bitwise-bad
15 * check-error-start
16 enum-bitwise-bad.c:9:14: error: incompatible restricted type
17 enum-bitwise-bad.c:9:14: expected: restricted apple_t
18 enum-bitwise-bad.c:9:14: got: restricted orange_t
19 * check-error-end