From patchwork Fri Dec 30 00:02:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 637826 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3180032pvb; Thu, 29 Dec 2022 16:10:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXsah8BENptJVXNC0kMRHSaMPRsdnBistA+QsMqITBEBFaEzm7cI+Eh1Pq2+d/Qvv/jEiNas X-Received: by 2002:a0c:e642:0:b0:531:9342:3693 with SMTP id c2-20020a0ce642000000b0053193423693mr13606524qvn.43.1672359058992; Thu, 29 Dec 2022 16:10:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672359058; cv=none; d=google.com; s=arc-20160816; b=QVTA+yHog5eVrPVGKQwu3zynry7mxWs+8bD8NAQqI+X2/BW51nnZlW5HWt/duGdzje MPbBARd8Ud6+08+hPgFv1u6tIvDlL0FWTFCRJI/DO5yFOCOFGb7SxKoSirRG4TlOwXDn XkqSsVZ1RLgwWJCgv+UynP+1ArtnO+nFq0dbetsGEqIO77rrb5vayldQ605SkKP1kPzn Y3XY95mDZSs86fJBa52+etTGqvDPezmamWA/Bm0LYDUmSMo8Vr+YdK6VZ9wIvKzToZWw BKbwLGDqGk9WUh8iTWw0JrdQP4Lb+GmIsKGUf517ehLCFQLI9AvhmqpuCPi6wu+HJV8m 43JQ== 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=NDyUR9+wcJ8EORRW1PKYuZZIf2KZz8Vnpv4F1dXjVm0ZW8MpGgKOQmPCIm5V71t5Og Q9VPAYHp9etk6X/5eTYEuRfSSQpNVABK+r47Q6afcecoHNY294GYg4qufDk5OeVD0ESv gTQuap61wpxOSONjMjvqnZLk81uT9bb1O3rYLABFQblnm6sZ8ZhX1UtbgVvhWTM1r2JS 2iUTIcPkAiimR653bTsEFtNX8rG5kw5uMElcvFc0GQBPt5LOEmShcj1tQcxxy6QtO+JR opxwjMwQP3XVQIo/bPFt+TGOcChlhEQgjE4eNWGGjHw+Y6gAVwDlrbw+C8hAdlBlOw+Z BeNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WOoRfVyQ; 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 s9-20020a0562140ca900b0053187bb06a9si5631649qvs.210.2022.12.29.16.10.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Dec 2022 16:10:58 -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=WOoRfVyQ; 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 1pB2sC-0003LV-GY; Thu, 29 Dec 2022 19:03:47 -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 1pB2rX-00039N-2y for qemu-devel@nongnu.org; Thu, 29 Dec 2022 19:03:05 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pB2rR-0002fG-UG for qemu-devel@nongnu.org; Thu, 29 Dec 2022 19:03:00 -0500 Received: by mail-pl1-x629.google.com with SMTP id g16so10694960plq.12 for ; Thu, 29 Dec 2022 16:02:47 -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=WOoRfVyQTjqZkMg1T8esrWnGgkOt0/+1E+Xu0U1kHFE9wHeg3BdOX1wTPbIhIJsFGh dcdPGjuWso3NfICWkuHxcKooRcdmDGIk+30SrKLpdxW4bpN1OVeHzwSVJ2Lj3ZOBmfOD pfqzKXdMVpyB9GCMMAyebYaFK0bihjOxjdKIa0OoB7EtsWx969K9/STFQAu5CUx8wgzP jZ689PuMj2DyWh6JSsaWgi9ZzX51AHq/bLXwGek1w2R39YUSie516/W3C2FR9Z1rLCeA B4wVDGQZN/dJTB3nZpclgLCYUSN1yDyXtJlngM0W4XxOfUbgRSLbTaGExQs9KSiKRzLh 6rEQ== 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=4i2NE4dxgZhz6IA+lx/MveiMdNkxE5aKRg/SoBxEY5wfBhBPBF5JGRzQK2s9aVpQMp z0OKx2fsWefmcqERfEzw+Aeq1eQwEwZ2Z+T+3jZgKueMiWs0l0LIfON6aOJVPoR92EXw CI/TVVe30QpZF48pq4zAwtyYA3q+duFCyvSmS3gLfHOzNOhSbJml4VU2+lPd/r2hYe7C pB7VXKz35ymNgjk6imXQBCmNvMMqUPnRM1HsMVHkulSffpzE9zAeIvuSxtU+reaplSaI +/cg9R93v4Yf7F3/jSWhUXFXQplXc0elxDxPswqE5fbzOO7rqckuVMh65Tx+KE3dMW+x pOTA== X-Gm-Message-State: AFqh2kr52FGjJLzR6nYUggoUeIWPM9JtIvGG9J36zyikPJtZDzkf434f 4lWnWdvTbSvF3D/dLapyC5BefzwhfFZG1Tcd X-Received: by 2002:a17:902:f786:b0:192:9d79:d3d6 with SMTP id q6-20020a170902f78600b001929d79d3d6mr6293450pln.69.1672358566868; Thu, 29 Dec 2022 16:02:46 -0800 (PST) Received: from stoup.. (76-14-210-194.or.wavecable.com. [76.14.210.194]) by smtp.gmail.com with ESMTPSA id j14-20020a170903028e00b00192849e1d0asm7343953plr.116.2022.12.29.16.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 16:02:46 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 26/47] tcg: Move TCG_TYPE_COUNT outside enum Date: Thu, 29 Dec 2022 16:02:00 -0800 Message-Id: <20221230000221.2764875-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221230000221.2764875-1-richard.henderson@linaro.org> References: <20221230000221.2764875-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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