From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWAgw-0005LQ-Jq for qemu-devel@nongnu.org; Mon, 22 Sep 2014 16:58:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWAgq-0005hc-La for qemu-devel@nongnu.org; Mon, 22 Sep 2014 16:58:38 -0400 Received: from mail-qc0-x234.google.com ([2607:f8b0:400d:c01::234]:58043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWAgq-0005gS-I7 for qemu-devel@nongnu.org; Mon, 22 Sep 2014 16:58:32 -0400 Received: by mail-qc0-f180.google.com with SMTP id l6so361444qcy.25 for ; Mon, 22 Sep 2014 13:58:27 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 22 Sep 2014 13:57:38 -0700 Message-Id: <1411419461-24390-9-git-send-email-rth@twiddle.net> In-Reply-To: <1411419461-24390-1-git-send-email-rth@twiddle.net> References: <1411419461-24390-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL 08/11] tcg: Move TCG_TYPE_COUNT out of enum TCGType List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org 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 --- 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