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