From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2440C433FE for ; Fri, 11 Dec 2020 15:49:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E6E623329 for ; Fri, 11 Dec 2020 15:49:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E6E623329 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knkfr-0004pu-Fe for qemu-devel@archiver.kernel.org; Fri, 11 Dec 2020 10:49:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knkc2-0001Dt-6u for qemu-devel@nongnu.org; Fri, 11 Dec 2020 10:45:42 -0500 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]:44677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knkbz-0004be-1d for qemu-devel@nongnu.org; Fri, 11 Dec 2020 10:45:41 -0500 Received: by mail-ot1-x343.google.com with SMTP id f16so8555912otl.11 for ; Fri, 11 Dec 2020 07:45:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Q9wD72eSFKjZSiS33UhIZ8+G867ZGk6kYMlL/As49q4=; b=Yd5KmsTA2RLHTrTucdPdwcizOVIPuP2laoQ+zYb9YNwugtw+DsWXcR1FkJoC2usLqJ DhfW3YMFm1H7pZ/x5K0xTd6DqfX4cnJxPGLlEA90h/3DSqmQ3F6A+AXn+TL9Ros5XT1A JGQgWwsqdIGsUIi81lt+w0VI0nFF80TEMC7U7pi6Uir1q9oVmxPEw3Ks1TIMckWK6W+v YBBnK/cFNxj6DjJM6cNMGE33gBJaBi//yL3BymUoolXtMNbp+L0nA8UAVkVo6Amx0OSr c3tEWDY/vKOP4rvBh17fQlmcoxeUc2AXMOK8pvbeAL7AXK55b3eO71Ke+CWaNK+ST4r7 bLCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Q9wD72eSFKjZSiS33UhIZ8+G867ZGk6kYMlL/As49q4=; b=V+QXCHZr9z0Y0SGmLbl+ui8ZWuF82Lr/+JT++cnVghdwZfMJASgGJ7vwY1NL9Tz85n wWpxllVstNlQ3d4L5fmJfFdr9fDrCt6ia8vcqaKDwyXnVNLUo3lr6kyfUBklHntOp9T0 j4E8OS5mQZlWt4kNGDnUi7GFllZ6TWrZ+bHjJI/gEU7gofJW0AP/nVEXNbCCCz4dN6fh vR0fi6bEOFdJM6OBku43aSpw2xIhqX6uqpY35jr7506rvHNNHF/qTC8MytS3VOi9Tqvg TzIJnswxZT3ERd8qF0KPv/LuE1Eb/8cR/1iiEco2kbENMpim9wWyQ/NovaYMNHLbfPhB LZZA== X-Gm-Message-State: AOAM530LuJwtpFPOgBP3tO6CbYUR9ZdrfbbCRtRL3bYW5Cwz2oNtZxmV e5ECNR1MGlLAlMsnDb4gzpXQaw== X-Google-Smtp-Source: ABdhPJyM/ZmEPrRqA89MjibyHPNKOuAP3E3T7XAjq3NEZIXa1eXS2oYp4rbmS9pdtqcP6t7+l0gCVQ== X-Received: by 2002:a9d:d8a:: with SMTP id 10mr10111890ots.11.1607701537767; Fri, 11 Dec 2020 07:45:37 -0800 (PST) Received: from [10.10.121.52] (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id h93sm1893496otb.29.2020.12.11.07.45.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Dec 2020 07:45:37 -0800 (PST) Subject: Re: [PATCH 10/12] tcg/optimize: Add fallthrough annotations To: Thomas Huth , Peter Maydell , qemu-devel@nongnu.org References: <20201211152426.350966-1-thuth@redhat.com> <20201211152426.350966-11-thuth@redhat.com> From: Richard Henderson Message-ID: <3e1c121d-b61d-3ebe-2555-5c886458cb36@linaro.org> Date: Fri, 11 Dec 2020 09:45:33 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201211152426.350966-11-thuth@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::343; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x343.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, NICE_REPLY_A=-0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 12/11/20 9:24 AM, Thomas Huth wrote: > To be able to compile this file with -Werror=implicit-fallthrough, > we need to add some fallthrough annotations to the case statements > that might fall through. Unfortunately, the typical "/* fallthrough */" > comments do not work here as expected since some case labels are > wrapped in macros and the compiler fails to match the comments in > this case. But using __attribute__((fallthrough)) seems to work fine, > so let's use that instead (by introducing a new QEMU_FALLTHROUGH > macro in our compiler.h header file). > > Signed-off-by: Thomas Huth > --- > include/qemu/compiler.h | 11 +++++++++++ > tcg/optimize.c | 4 ++++ > 2 files changed, 15 insertions(+) Reviewed-by: Richard Henderson r~