Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1899628ima; Mon, 22 Oct 2018 00:05:01 -0700 (PDT) X-Google-Smtp-Source: ACcGV634HxLePvsJrh5oq1sm26s8Y9/iY++JfrqU4jjw/SyWmW7oaeUC/DY6wmyzQ2iaPKNsIpjo X-Received: by 2002:a17:902:b485:: with SMTP id y5-v6mr31400268plr.122.1540191901651; Mon, 22 Oct 2018 00:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540191901; cv=none; d=google.com; s=arc-20160816; b=Er3Q9nDpRGa7eLM0327/hz12ca7/yWOONHsSeMklMCYRuzYDjxs3kPEMx201ym8J4Y 9klXwPyAoVHKZvwcJYNxy9LEzbx3kXWfVImCKIbWrAQJ2Y6XHeUCpeZjhbeOBpPxdf7O vZ+gRARqJ0XyvOBdxsuXsnQy0AiqWPnbCuBNFGYxjDj9q97mRzRLQi18ITjHDpp9QidU NKGchnBkjxDY9v3sjVjHX7fUOHpuAEFSUg/uHz2U3EWxGdNLkaP7spueVr8MtsTDlriK njHnCDRhDPlgrlwLr7JLJQpFMPafwpzIvkGnpH3oBIXlq9Rwpo/PQEIKToiIJJ3DXQsV bKPA== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=IUZeN9aBqiZufAbtuAENw80fItc0IGY3kZAChRfervI=; b=Sb3FCWhCChNBFlC0NJGrlD+CEKLrIvqflhc4wDrlsSZ2GT7j2GwRtWcL35FLmFR8ZG nfL2yNJ0REtoMUpP7mYqfBPjVElj0ijH+tCD6iOnHXlUSXXHyV7/sJkZutYxcsrtEPlE 8bMAhw+2Lu1iLQXznRTSZrwHdXba2usHcGcCMR1GaaoQ4d9RShDBdgddHsATu+0dB/8M 28mZ3+wBNe8bAmV02jDpQ7J2VdLlFo58ULxb0D2zPIZLP2y/YU7nGICJGWlIQafJ6M+f pU2IenOvAnCFwUNjGGWw9KCFskM6ndpsrcKozimakwnKKqx8N0+Ote43VrhjtYDn6V8c RQrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=rIQR3kHM; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b19-v6si32596222plz.16.2018.10.22.00.04.45; Mon, 22 Oct 2018 00:05:01 -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=fail header.i=@thunk.org header.s=ef5046eb header.b=rIQR3kHM; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727519AbeJVPQQ (ORCPT + 99 others); Mon, 22 Oct 2018 11:16:16 -0400 Received: from imap.thunk.org ([74.207.234.97]:43514 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726784AbeJVPQP (ORCPT ); Mon, 22 Oct 2018 11:16:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: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=IUZeN9aBqiZufAbtuAENw80fItc0IGY3kZAChRfervI=; b=rIQR3kHMho+ZN5NgWWBLJcmrab Wc8dx1AmeKvuvBdfQpA+2RRNo8CZoCyfcr4q0EZIPOPqEQv9kOPC2CJLMPxHkbkgGdmgiN+jTKxM3 8pgCaoB4Teloj6HxFyn+2ZRlI+xaNlkTFs/+DpTSj2LWZGDql3tIzQp7Rq1ER5P+qGv4=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1gEUA6-0000Rp-IP; Mon, 22 Oct 2018 06:58:02 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id B12087A2F4E; Mon, 22 Oct 2018 02:58:00 -0400 (EDT) Date: Mon, 22 Oct 2018 02:58:00 -0400 From: "Theodore Y. Ts'o" To: Matthew Wilcox Cc: Miguel Ojeda , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Dan Carpenter , 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: <20181022065800.GK1617@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , Matthew Wilcox , Miguel Ojeda , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Dan Carpenter , 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 References: <20181021171414.22674-1-miguel.ojeda.sandonis@gmail.com> <20181021171414.22674-2-miguel.ojeda.sandonis@gmail.com> <20181022004217.GA4941@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: <20181022004217.GA4941@bombadil.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Oct 21, 2018 at 05:42:18PM -0700, Matthew Wilcox wrote: > On Sun, Oct 21, 2018 at 07:14:13PM +0200, Miguel Ojeda wrote: > > +#if __has_attribute(__fallthrough__) > > +# define __fallthrough __attribute__((__fallthrough__)) > > +#else > > +# define __fallthrough > > +#endif > > Why is the #else not: > > # define __fallthrough /* fallthrough */ > > Would this solve the Coverity problem, or does Coverity look at the raw > source code before preprocessing? Wouldn't the "/* ... */" be eaten by the preprocessor before defining the __fallthrough cpp macro? (e.g., try running the attached script) - Ted --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=foo #!/bin/bash cat << EOF > /tmp/test$$.c #define foobar quux /* foobar */ foobar EOF gcc -E /tmp/test$$.c rm -f /tmp/test$$.c --ikeVEW9yuYc//A+q--