From patchwork Tue Dec 13 21:25:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 633520 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3342465pvb; Tue, 13 Dec 2022 13:26:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf5R6J7f2VgB8tL5tbmveGjPAciwJG6v6wQr053KXqwaNOHBy02T12PmoTk/wqthHVf/O8m5 X-Received: by 2002:ac8:6887:0:b0:3a5:10c3:13ff with SMTP id m7-20020ac86887000000b003a510c313ffmr27764228qtq.48.1670966815473; Tue, 13 Dec 2022 13:26:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670966815; cv=none; d=google.com; s=arc-20160816; b=TOkbxMrf8A9mo55x7CDKgtoWiRIYf3kfD954bBZVjEDWxdVGAJ5uElgkF1TPtSlm4P pQd3FMjOTJVfEHb0oNUlF+11mrK7wHyqMnRS1CUQRqJkSzQ1kxn4NqCJh/30feJKtcUc B8EhCkV2ZXuiTZ4TfjUuhtWdBUKyvQjg3NtToLYMxCoftRf4KWwHMHpaqSj6r3FL9TYh Gsl2X5+d9+fSr6hGLMnNNzDgDFqPD0s9g3T3YVTmoMls6IDydVIT42IkOrEm+j3PWz8q 2OeKxNZxpHhRKHxvU7lQF1veU2eE+X25dDuzxajSr4pjf+D3bItC1WROtAPTHv5vP59q U4CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g+8yoDAKtbWcn6kd6zbMcipsZN6xB1eyyko6EmQwVd4=; b=v1ui821bCb03u2mZ/TWX9IEic5R4WZqGubvpdx8839ffFgTelPOgQquJKu/6JW7kl1 FbCp0OluSnJ0G66nyitiuFy6mmudfknxyFGcnFCflYKQh/TSYQbmEq69VcIH7VJQshVL tIYw5OuGriWNVE7yr18H19G/KcZuinmx6ggLJBy9mH8JmOyuJGXjSTdEi0Epbble28cp U7BKbVKEOtgAY6H0kLVHtNDs+Thz6PJj98RXkPbtyzYNzoKRcGDHO79/zpLpBwLRXu6c +oyH6DQ4nowX/u8C/gneywWtq/haxRIMwbeFcbxIknOMTZdU9wEXunTt/ZOgptm6f71J uvWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u2VYPKwT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id cq12-20020a05622a424c00b003a817065394si639399qtb.693.2022.12.13.13.26.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Dec 2022 13:26:55 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u2VYPKwT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5Cmn-0000ey-IK; Tue, 13 Dec 2022 16:26:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5Cmj-0000d8-S2 for qemu-devel@nongnu.org; Tue, 13 Dec 2022 16:25:57 -0500 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5Cmh-0003Dd-93 for qemu-devel@nongnu.org; Tue, 13 Dec 2022 16:25:57 -0500 Received: by mail-oi1-x235.google.com with SMTP id r130so1053666oih.2 for ; Tue, 13 Dec 2022 13:25:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=g+8yoDAKtbWcn6kd6zbMcipsZN6xB1eyyko6EmQwVd4=; b=u2VYPKwTiOzufQhtwVhv/H7VrnIXSasov7WRww9TT82jmeEwxD6cOYxrV0yfGRZYps z+Q4DNUERk8wBghRze+IwTI1sIKqgqn+di7ypjF8pkclsLgbcUlgen4O+WXrdmvzEeRc kiHVLlHOnr+Vc87qJUD65OcAaLGmZh/nMqsmgO7W7iIW40G1XkMvxTPNFND5KxE8zN1n J290vYJbhiqor6dyRGqTFWHDAv7GlBiqOFtShCN0jAMij14VtK2kDz2tSyNm2ut2pkNa 8aGMHvW0c/RMvVLT9bThekneGuvbYr3oQ+CNGXbKF7GBgCLrX0cit3lGga5jV0jZtTVh fgoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g+8yoDAKtbWcn6kd6zbMcipsZN6xB1eyyko6EmQwVd4=; b=1I40lw40mdvyLvl3n/eN5q0SByeGGndYWE60XjY9Ig3mbaZEQZbZCctMA5CkXjU1FW bA2NbvU21kR167uooyZk9i5jnX4ifmL9QxG/xKgAxGn6Yj37WOFKYxQ8QpOSu/mIKQPn pE83jxacfAP91LpaYSRpQjJz8akh9Yb4XJ1kHVio/oNeOyxLAMUHS9ZYTGkkU522E+yI Smp85Fy1NAEfruItw7LWGXOBcooL9O7Z4Pu3/05OmlQQ2REHNHDj4nQdiN6Yyb6PKrpG H6u2FkQgsrYRKswkcw3JDVVt47I/bgeO8iEPZYYPYnvbIURtdrJ7REfwf6jkPTR3H556 /izw== X-Gm-Message-State: ANoB5pkON4x5i91vy61MdQUvfuoaQqxdoWfaJSOVWcInwsDN+f+8X0EM 2++GWG943HtWfE1scU8XkYVHwtl94TdRtceeKxA= X-Received: by 2002:a05:6808:491:b0:35e:8855:1f2f with SMTP id z17-20020a056808049100b0035e88551f2fmr5502380oid.31.1670966754631; Tue, 13 Dec 2022 13:25:54 -0800 (PST) Received: from stoup.. ([2806:102e:18:2efc:c63:85ed:4256:8ad0]) by smtp.gmail.com with ESMTPSA id a7-20020a056808098700b0035c073aa0d8sm5006831oic.18.2022.12.13.13.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 13:25:54 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 11/27] tcg: Move TCG_TYPE_COUNT outside enum Date: Tue, 13 Dec 2022 15:25:25 -0600 Message-Id: <20221213212541.1820840-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221213212541.1820840-1-richard.henderson@linaro.org> References: <20221213212541.1820840-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::235; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x235.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The count is not itself an enumerator. Move it outside to prevent the compiler from considering it with -Wswitch-enum. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index afa18986b1..f2da340bb9 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -294,7 +294,8 @@ typedef enum TCGType { TCG_TYPE_V128, TCG_TYPE_V256, - TCG_TYPE_COUNT, /* number of different types */ + /* Number of different types (integer not enum) */ +#define TCG_TYPE_COUNT (TCG_TYPE_V256 + 1) /* An alias for the size of the host register. */ #if TCG_TARGET_REG_BITS == 32