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