Having the count inside the enumeration makes gcc believe that we want to be able to store values 0-2, and thus a 1-bit bitfield cannot hold the enumeration. With the count as a define external to the enum, gcc correctly sees that we only care about values 0-1.
Signed-off-by: Richard Henderson <r...@twiddle.net> --- tcg/tcg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index 997a704..fcc50bd 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -194,7 +194,6 @@ typedef struct TCGPool { typedef enum TCGType { TCG_TYPE_I32, TCG_TYPE_I64, - TCG_TYPE_COUNT, /* number of different types */ /* An alias for the size of the host register. */ #if TCG_TARGET_REG_BITS == 32 @@ -218,6 +217,8 @@ typedef enum TCGType { #endif } TCGType; +#define TCG_TYPE_COUNT 2 + /* Constants for qemu_ld and qemu_st for the Memory Operation field. */ typedef enum TCGMemOp { MO_8 = 0, -- 1.9.3