blob: fcdb8d7a06de132cd92446248440cc944158dafc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#define __bitwise __attribute__((bitwise))
#define __force __attribute__((force))
typedef long long __bitwise bits;
enum r {
RZ = (__force bits) 0,
RO = (__force bits) 1,
RM = (__force bits) -1,
};
_Static_assert([typeof(RZ)] == [bits], "RZ");
_Static_assert([typeof(RO)] == [bits], "RO");
_Static_assert([typeof(RM)] == [bits], "RM");
_Static_assert(sizeof(enum r) == sizeof(bits), "bits");
/*
* check-name: enum-bitwise
*/
|