Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp869933pxv; Thu, 15 Jul 2021 18:28:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJGsWWZB6pvRU/a7BMrM4/kG3nNteoxE3ED1+QZ8t3AtVYaX1yrDnVTfNF9yizGAOoAbqR X-Received: by 2002:a17:907:f98:: with SMTP id kb24mr8689457ejc.554.1626398901646; Thu, 15 Jul 2021 18:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626398901; cv=none; d=google.com; s=arc-20160816; b=c88IhB3+R7MaiCj9XW+93uwI9TNCgVtCX6noFuaXqiOrMwBrOME5vAbbBhdEjUYpYq EhAkMXRSjCLMTcyiic9bjbUj1MQqNeqMa1sUb02x0UyfH6Qvxv7FshC4untOdU70Dges AEdJTHPB6gOZlugwel0PvL5h7I7L+DUeZxW3QamSbFPcUnTmU+VZFZ+Fw1MBHXM95Tg3 b/eyI/6Ko+wNru3AqxVkwID3Nb4wnnFtidPNnSfq9AXpZaRAY/e6bfECHBXKYtlB8I7o pUEtpwrquZv7RE8y+W6miVXZHPEvNy9XaMmuACch60ifNNbAeCfUzCc3+xu3gHu+whBS zqMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=4ffx1bAv414YMi1a8ax0I4veMZTSEXNs7IRiNasuJUI=; b=zWmGwMUzZLIE/lpPNDC4u8s1RbOAb93nAe8O8i4gJQsCvGbglgrbMhkZarY9I9/s8h bzXJiVziaFXwexhzaiA1oCe5VMNYK6vZbFoUfgtJEU4VJkixrb0wfKXXavBXd8CMYVUb VAmfF12XHDAhfECRmGPt2swkH9Ti/QUCv3RepQ+vAuuKPFKCqEtPOh3Ggnv8tPBUDCkD 9K/l5CURI1wHeXAxdgr0gB2ilDT1bk7YuJ6KOT5EujjriduNibL8JJD13J2ykiN2cc+Q kF1kinvs6BMP690Uk2vgAwdd6vbDYlJHh+YyYhaY/kmVG1xTQvC9PaM0BButJhFkKIOD MrnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@embeddedor.com header.s=default header.b=ixPCJxq3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p26si9067191ejf.481.2021.07.15.18.27.58; Thu, 15 Jul 2021 18:28:21 -0700 (PDT) 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=fail header.i=@embeddedor.com header.s=default header.b=ixPCJxq3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbhGPB3z (ORCPT + 99 others); Thu, 15 Jul 2021 21:29:55 -0400 Received: from gateway36.websitewelcome.com ([192.185.193.119]:18076 "EHLO gateway36.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbhGPB3z (ORCPT ); Thu, 15 Jul 2021 21:29:55 -0400 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 0C44C40153B79 for ; Thu, 15 Jul 2021 20:26:58 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id 4Cd0mkqcsuMjb4Cd0mXJ28; Thu, 15 Jul 2021 20:26:58 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=embeddedor.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4ffx1bAv414YMi1a8ax0I4veMZTSEXNs7IRiNasuJUI=; b=ixPCJxq321RHehbRKwj1q8fkZ5 9a7GJWJKgizpVgnD1Q3b+ncjd9I25RWnvhwzOv7m678V4BFtpDlYDT9IiaF3JQtHAjD+GIf5zuwCF b9YJlSychUOKeon8UJ62vNgIZBSgLQJNL4Njcji3lf13ov5C2ytc9u8zlBtP/w3RQIIEvJXxM5n5l rinWp9aEaaKxqrAxO9b4UVb2RwJkyyrMXvz+WOaBIxc86SJcHG1vXq/2XXy8/JEViWJz1ovgoQCs7 xdbkIc7K+QmUZabqAw3pvNHmlOzgzlAgTojXBhfbUFJyCGsyQGbZerqkCfQy8fSZrocJ0D7syEjcm MGzDgalw==; Received: from 187-162-31-110.static.axtel.net ([187.162.31.110]:40530 helo=[192.168.15.8]) by gator4166.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1m4Ccx-003ZSU-Ko; Thu, 15 Jul 2021 20:26:55 -0500 Subject: Re: [GIT PULL] fallthrough fixes for Clang for 5.14-rc2 To: Linus Torvalds Cc: "Gustavo A. R. Silva" , Nathan Chancellor , Nick Desaulniers , Kees Cook , Linux Kernel Mailing List , clang-built-linux References: <20210714200523.GA10606@embeddedor> <5d170cc8-501d-0cec-bf03-2f53108a8486@embeddedor.com> From: "Gustavo A. R. Silva" Message-ID: <31b951ff-9c65-b774-87a9-35c28e54636a@embeddedor.com> Date: Thu, 15 Jul 2021 20:29:07 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 187.162.31.110 X-Source-L: No X-Exim-ID: 1m4Ccx-003ZSU-Ko X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 187-162-31-110.static.axtel.net ([192.168.15.8]) [187.162.31.110]:40530 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 13 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/15/21 20:22, Linus Torvalds wrote: > On Thu, Jul 15, 2021 at 6:14 PM Gustavo A. R. Silva > wrote: >> >> Kees just opened a bug report for this: >> >> https://bugs.llvm.org/show_bug.cgi?id=51094 > > I don't have an account on that bugzilla, but it might be worth adding > the note that no warning or error should EVER not say where it > happens. Yeah; I'll add that to the report. Here is the current description of the bug: "There are some places in the kernel where the "fallthrough;" annotation is used after a portion of code that may get elided at build time: case 1: if (something || !IS_ENALBED(CONFIG_SOMETHING)) return blah; fallthrough; case 2: This looks like: case 1: fallthrough; case 2: And a warning is generated: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough] But isn't a useful warning in this case, and should likely be silenced or adjust to not warn where there was actually code there before getting elided. At the least, this warning would be best moved to a separate flag so it can be disabled on kernel builds (i.e. GCC does not warn about these cases). Some specific examples: https://github.com/ClangBuiltLinux/continuous-integration2/runs/3058126539?check_suite_focus=true#step:5:120 https://github.com/ClangBuiltLinux/continuous-integration2/runs/3058126329?check_suite_focus=true#step:5:92 " > That's the thing that made me pissed off in the first place. I build > my kernels with "make -j128", and if the warning doesn't specify the > filename and the line number, the warning is just unacceptably bad. > > How can a compiler _ever_ give a warning without specifying where it is? > > The fact that the warning is also entirely wrong-headed in the first > place is just the extra cherry on top. > > But at least it should hopefully make it easy to fix in clang - just > remove the incredibly broken thing entirely. > > Linus > -- Gustavo