smatch_data/kernel.unreachable.ignore: add BUG(), WARN_ON() and others
[smatch.git] / validation / enum-type-exotic.c
bloba17ca0ad48ef7ae9768a4ca6474e7c38d6ea9ce8
1 enum foobar {
2 C = (unsigned char)0,
3 L = 1L,
4 };
6 unsigned int foo(void);
7 unsigned int foo(void)
9 #ifdef __CHECKER__
10 _Static_assert([typeof(C)] == [enum foobar], "enum type");
11 _Static_assert([typeof(C)] != [unsigned char], "char type");
12 #endif
14 typeof(C) v = ~0;
15 return v;
19 * check-name: enum-type-exotic
20 * check-description:
21 * GCC type's for C is 'int' or maybe 'unsigned int'
22 * but certainly not 'unsigned char' like here.
23 * check-command: test-linearize -Wno-decl $file
24 * check-known-to-fail
26 * check-output-ignore
27 * check-output-excludes: ret\\.32 *\\$255