Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2053657ima; Mon, 22 Oct 2018 03:30:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV61eckBbt1a7hqG4kyoOT7jUvwIgVDyac58sFabeG3kS0HWP62/OLO5ydL080AjJ654zjKZ4 X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr44779357plt.268.1540204239071; Mon, 22 Oct 2018 03:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540204239; cv=none; d=google.com; s=arc-20160816; b=Gy7bwZFzvHeDY90QTIAzWFyD1OdL74Nz0NTuRfZ2TTepln3yZ1OBXfsXWT/ie570nv 27rnDvRQM4swob0Rg92jAV3IPUaJaz6ZgMsefMHmw8o5QRr29+Bg64KBmfLRymXAT8Ip EVkfg+VL55N9wZ7JUaxqItOsV3s/g9NnUdNwfYTBW+FT3T8E3kOTKn9xrOAu+V6k0mbz bO384VlD/CFZfDopLKJ200J9Yr+nyLln2L3+D9rt+h0wqGHZlrAi5ih2cPYSjHOA+sk6 SsGVbdhbcvip6GCLu/nUYJnykHtQQEFT2ysmHiSs4BcYfxUbz62V2+HIi/KwFFH6koLP ZvzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WYiFHO05oFRZx7Uwgb8OEXnSI45jD9jUBA6q1zD7taU=; b=mLQhIDYSuZG9QHc5d4dGedrCqTt/F0WnKRR6FZDo+aZ5YmQTnxAnwOQ9cyGHkLG4kY yWt9bR89ofC8lk64Gjb0Qbpq1DlpcRs6V9JCeIX6++k+D9fXnNKVYc5lMjEwINOAe8Zj 9Av4TMy/xO4YJaYXQiAV9ju/gV2VZNigVbkUwG4DjPE9zHJXsmHNJcXUcwtaD6Wieb66 Fa4HsVKVZpcSWwiuQ2iQYFjeat9uwn5H13RdFks90Kuq7FmpB/aXfrZym+5vbyX/ilJD fyBd4DMSfeKMS2ZqJwLzeoaf11IDT3yiMjEybLlUv2jRSs/1XIxVWrd7+W+wjZiPvaa5 aMIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=YmTupfTC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si31461036pgp.376.2018.10.22.03.30.23; Mon, 22 Oct 2018 03:30:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=YmTupfTC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728464AbeJVSr7 (ORCPT + 99 others); Mon, 22 Oct 2018 14:47:59 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:57058 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727797AbeJVSr7 (ORCPT ); Mon, 22 Oct 2018 14:47:59 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9MANgJK097602; Mon, 22 Oct 2018 10:28:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=WYiFHO05oFRZx7Uwgb8OEXnSI45jD9jUBA6q1zD7taU=; b=YmTupfTCSnUBBUkgueI4VlF8KbCzWt9wYp4hZbxmCT7PK/kXA4jHg2FpLMoLXpHoymFq 4PtAxvxiVoUjAKgeIwVH8+ZLi7x8TCv73AURWSaYhgrHfzbnN8R6D3MjTCyciEFIQED2 iTfZ7rvqQPHyVg6CJAAIiWL7bI9/geq6/Ncm087TRaK6qS9cf3cLi397sVkNsNt+tzdn 7LjTYwSeYNquEP6PDXQ0jjclvqvFp/jg741vltZ1YST1WKJDgRQVny/zA/3kTcbc9vI9 62WRTCSHRqENtSUmyipuaRzK6Gg7q5b3sO09joSTfP81xg99UcWm1IrsVqCLpsxCYSNL mg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2n7ustwmue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Oct 2018 10:28:15 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9MASFg1013826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Oct 2018 10:28:15 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9MAS4R8001605; Mon, 22 Oct 2018 10:28:06 GMT Received: from mwanda (/129.205.6.86) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 22 Oct 2018 03:28:03 -0700 Date: Mon, 22 Oct 2018 13:27:43 +0300 From: Dan Carpenter To: Bernd Petrovitsch Cc: "Theodore Y. Ts'o" , Miguel Ojeda , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Andreas Dilger , Masahiro Yamada , Michal Marek , Steven Rostedt , Mauro Carvalho Chehab , Olof Johansson , Konstantin Ryabitsev , "David S . Miller" , Andrey Ryabinin , Kees Cook , Thomas Gleixner , Ingo Molnar , Paul Lawrence , Sandipan Das , Andrey Konovalov , David Woodhouse , Will Deacon , Philippe Ombredanne , Paul Burton , David Rientjes , Willy Tarreau , Martin Sebor , Christopher Li , Jonathan Corbet , Geert Uytterhoeven , Rasmus Villemoes , Joe Perches , Arnd Bergmann , Dominique Martinet , Stefan Agner , Luc Van Oostenryck , Nick Desaulniers , Andrew Morton , Linus Torvalds , linux-doc@vger.kernel.org, linux-ext4@vger.kernel.org, linux-sparse@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH 1/2] Compiler Attributes: add support for __fallthrough (gcc >= 7.1) Message-ID: <20181022102743.nua5fgbscyeymzal@mwanda> References: <20181021171414.22674-1-miguel.ojeda.sandonis@gmail.com> <20181021171414.22674-2-miguel.ojeda.sandonis@gmail.com> <20181021222712.GI1617@thunk.org> <8fb78062-b6d4-6f2d-d943-44bec6b95ff0@petrovitsch.priv.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8fb78062-b6d4-6f2d-d943-44bec6b95ff0@petrovitsch.priv.at> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9053 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810220093 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 22, 2018 at 11:41:56AM +0200, Bernd Petrovitsch wrote: > On 22/10/2018 00:27, Theodore Y. Ts'o wrote: > > On Sun, Oct 21, 2018 at 07:14:13PM +0200, Miguel Ojeda wrote: > >> From the GCC manual: > >> > >> fallthrough > >> > >> The fallthrough attribute with a null statement serves as a > >> fallthrough statement. It hints to the compiler that a statement > >> that falls through to another case label, or user-defined label > >> in a switch statement is intentional and thus the -Wimplicit-fallthrough > >> warning must not trigger. The fallthrough attribute may appear > >> at most once in each attribute list, and may not be mixed with > >> other attributes. It can only be used in a switch statement > >> (the compiler will issue an error otherwise), after a preceding > >> statement and before a logically succeeding case label, > >> or user-defined label. > >> > >> https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html > > > > Do we know if coverity understands the fallthrough attribute? One of > > the reasons why I started using /* fallthrough */ is because it kept > > Coverity happy. > > FWIW, current "eclipse" has the same "problem". > > > If the conversion from /* fallthrough */ to the __fallthrough__ > > attribute means that we start gethting a lot of Coverity warnings, > > We could keep both. What does that even mean? Use both the attribute and the comment until Eclipse is updated? case 3: frob(); __fall_through; /* fall through */ case 4: That seems like a wrong idea... regards, dan carpenter