Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1449761pxb; Fri, 13 Nov 2020 13:02:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzT+or0+wP9alhHVTOVzS91iHYQ03SAQKK5aFBmoJFN1weSkxzbTp5Y116KKgRk7SP5b+k0 X-Received: by 2002:a17:906:3641:: with SMTP id r1mr4019164ejb.391.1605301348577; Fri, 13 Nov 2020 13:02:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605301348; cv=none; d=google.com; s=arc-20160816; b=gTKs7KFEztwJh1tHTmG+G0Onjmz6rZ0CiIX4EhwuMSsvaLaO+oXcV/e8GcS8C+Em5W 9bX9Larf9soNuGyDhliXugqMgeewpyfda4v/pw+F5G58f46An20GpfPeSCb/Ge2Y1oEl t1HdTsElVZ2QA+ot7u2GwKJ/w4JDF22wkIlTt93/9lrJe8qAs/A8xuLZ6NNk9XVqWkp+ /kUP505aGjOh8xn1i5PxbQ6WPKMNvRTHOk6roSDczOj1YDJBsvG5IDanRTkYiKCNdoeA 4AT8z9ay8zNJsQRgGkuGjJg16IHZfSKMuhFi1LqT7SwHYWa6Oa8ZQgD6pvEQnURnkbVI wUng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=gmGncwYFUvMs6I+eFXEBgHlp3fnbadm1lmVPKMGl9W8=; b=urxN2Or0mFXweL4wTs4//+9wzO05cnYH3WDgCbYSj8GOoCPwkpSb2iO0IcOONL1fxs HcNBqvlQna4DzuZNgy8cos6EAR96/FKksmIPj6gwoxmqC4DA0japBAXv8YD+fTYK1SUo I9WU0VxDXgyVEos1MaXIsn7mE8i7sqEPvYB7XMoqF4HJY4DSdFlfLcCb1Fk6aKghJIxY l6z8d3Zma2jYeSWtMEGsTsUEFRLTl6IychqJfq4JufhlDmc0qV3EukqIfIyW5K/6gbGI RJFv/Hfbk9IBPnoykooRbGoxlU9z/pYH6psljAs8od88lhA7XNwlK7gY6S/PKg1Z54y7 Y84g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=usPrvtFP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m13si3919004edi.374.2020.11.13.13.02.06; Fri, 13 Nov 2020 13:02:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=usPrvtFP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726112AbgKMVAj (ORCPT + 99 others); Fri, 13 Nov 2020 16:00:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbgKMVAi (ORCPT ); Fri, 13 Nov 2020 16:00:38 -0500 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8251BC0613D1 for ; Fri, 13 Nov 2020 13:00:38 -0800 (PST) Received: by mail-pl1-x642.google.com with SMTP id b3so5102990pls.11 for ; Fri, 13 Nov 2020 13:00:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gmGncwYFUvMs6I+eFXEBgHlp3fnbadm1lmVPKMGl9W8=; b=usPrvtFP0mjVTGhG9cOFApqky0N+toPMIZu+IpepobuQ5dM96VP5NgRcWslMI8H/rn AkhcQMvh1SHojptjsFXvFcDZE+lxt82u10QvfX4tmuv4O7EDUwhaG1vBvNx0vX1RBw3A RsQzYIhquP12BJPyPyc7DVTjFSb+fByhR7UkkzD6VNN/GmJIlrc76vJrUo2v8NdN4lj3 zQ+WicrHJc24kzxFgXp/r5uX8m9DnhSfaig8rsbRTyo0v69oHxLiOE3eF7PpzqBOo/OU nOqH7ZjfKZjujs6dldp7ZaQrr88SIxfn40NfXdM5trQ4OM9jeT5htISNn+KfSPyxGWAE kgdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gmGncwYFUvMs6I+eFXEBgHlp3fnbadm1lmVPKMGl9W8=; b=m8tm4f6Nq+8cM6GX8VXXFmbEcUKhB1gXVZSZnP5jLVR7+NKpTvEX0N7Vwc3hBdEpwL kb7EgW+F58DnZ92/Yo3VszIe1/VoXzFkVOS9kIxwmVmIYjNKYIc46n4RlnmKPB8z/4zX 3m739sOXO/pT4OyqhUZDZxSO+QuU5ucHEDynBxAli7KfZLNbohr4D2Hxi97b8nJTmjs1 VjlD0voHlMqj0OhBtm+1BRYYG46RSE8Gx4K63pRGHv/F+MUFDWFQPbB+UvrhcQA3k8Li egMVzxySet7z3H5ggOb0rO+cx96WvsOaRZAAOiopXo5CsFvFW376n0PoNol7M4pFmo7C ah/g== X-Gm-Message-State: AOAM532zeK5tAx21uiLKFRpUNxCVrLpTcWKdjVYSxEAU6jyBRVws73RX vjotdt0ZkmWVTqbyiXZhPbecO2WeHvMuYbp2R5/aNQ== X-Received: by 2002:a17:902:ee85:b029:d6:c43e:2321 with SMTP id a5-20020a170902ee85b02900d6c43e2321mr3313392pld.29.1605301237814; Fri, 13 Nov 2020 13:00:37 -0800 (PST) MIME-Version: 1.0 References: <20201111021131.822867-1-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Fri, 13 Nov 2020 13:00:26 -0800 Message-ID: Subject: Re: [PATCH] ACPICA: fix -Wfallthrough To: Miguel Ojeda , "Moore, Robert" Cc: "Kaneda, Erik" , "Wysocki, Rafael J" , "Gustavo A . R . Silva" , "clang-built-linux@googlegroups.com" , Len Brown , "linux-acpi@vger.kernel.org" , "devel@acpica.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 13, 2020 at 12:14 AM Miguel Ojeda wrote: > > On Fri, Nov 13, 2020 at 1:09 AM Nick Desaulniers > wrote: > > > > Thank you for the explicit diagnostics observed. Something fishy is > > going on though, https://godbolt.org/z/Gbxbxa is how I expect MSVC to > > handle include/linux/compiler_attributes.h. > > > > The C preprocessor should make it such that MSVC never sees > > `__attribute__` or `__fallthrough__`; that it does begs the question. > > That would seem to imply that `#if __has_attribute(__fallthrough__)` > > somehow evaluates to true on MSVC, but my godbolt link shows it does > > not. > > > > Could the upstream ACPICA project be #define'ing something that could > > be altering this? (Or not #define'ing something?) > > > > Worst case, we could do as Joe Perches suggested and disable > > -Wfallthrough for drivers/acpi/acpica/. > > I agree, something is fishy. MSVC has several flags for conformance > and extensions support, including two full C preprocessors in newer > versions; which means we might be missing something, but I don't see > how the code in compiler_attributes.h could be confusing MSVC even in > older non-conforming versions. unless ``` # define fallthrough __attribute__((__fallthrough__)) ``` was copy and pasted into the code, rather than #including the whole header? -- Thanks, ~Nick Desaulniers