Received: by 10.223.164.202 with SMTP id h10csp3507394wrb; Tue, 28 Nov 2017 12:26:53 -0800 (PST) X-Google-Smtp-Source: AGs4zMZLojgwNQ2kX9M0RlsEnb0UXgpeH0VT+FZDJPLJF5QUYoBUeUh5bUAK7fhJS9queFqwAnrk X-Received: by 10.98.23.68 with SMTP id 65mr377153pfx.25.1511900813192; Tue, 28 Nov 2017 12:26:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511900813; cv=none; d=google.com; s=arc-20160816; b=jQ9uIx9cOENsvY9aaiJY3E+I9msqvgnNWHVYZWgHZMFCP9oNwChjEKhVBv+RcgF9L+ TtJ+moQ4Ehc87gA+qbofkdlJtKKJvDcljnwWVqTQ0Y3ZeH+1Qdfg4BbBP0QG7515b+Bh 9KzPChI3qv8kmLIX6coDhAoX5eG0+3S9pT2aLUdnbhzS1Ks0uABMutwWSQ9TWpmNCd5Q fkGkARfMsT/oP9NelKMq53/ygJMECFqqgf3hXxaE4QPf05bPS0gobndzywKF3quD9/z/ VWX5CiPS8M11HILl49fuf8MRU3pXVpn6hdpUC53xzrZLREsv7O6DXlXucpjegzhyp/Nz YNaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :user-agent:in-reply-to:references:subject:cc:to:from:message-id :date:arc-authentication-results; bh=1yVhvY0U9thvvY7VuErWdj723CvpjWVQoMS36XFbtoc=; b=Jc4pTo6XG54MEHRhktff/97FjOfl8Pt0NS3X5rl4sI2Y1h8Kr5DZLltSOBTcX+u3km PifGRZmH1v5Kws/EnazAZyiex4qldlRYCrgHgJ2Ftcw2GsqpVBoFbfqfxmDkjZF54QRa wFlZYWuV+tzxL09OWb4MRtNENYPO5DEGtytV4vOjbIqlCj7KWP2Jgnl0xISWF/0NVs7W 9cSc5UZK/t7rTgGL1XY5oPy6rSWdtWhy0XmTrEy3qgWowO7EAroSa9JXooqDSwWF6r/9 zv/QZt3FslJkgiEH4R7KRg+uZ5G+/JS50ZwjurkdLxYTq/WUFuP5IhBrCQDcr1DQjC0h SUow== ARC-Authentication-Results: i=1; mx.google.com; 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 h5si1730pgv.48.2017.11.28.12.26.42; Tue, 28 Nov 2017 12:26:53 -0800 (PST) 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; 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 S1754145AbdK1UZe (ORCPT + 70 others); Tue, 28 Nov 2017 15:25:34 -0500 Received: from gateway30.websitewelcome.com ([192.185.145.3]:44350 "EHLO gateway30.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932072AbdK1UZd (ORCPT ); Tue, 28 Nov 2017 15:25:33 -0500 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 91067C42F for ; Tue, 28 Nov 2017 14:25:32 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id JmRgeh8b7RtUXJmRgeoV50; Tue, 28 Nov 2017 14:25:32 -0600 Received: from gator4166.hostgator.com ([108.167.133.22]:60691) by gator4166.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1eJmRg-0007a9-52; Tue, 28 Nov 2017 14:25:32 -0600 Received: from 189.175.122.225 ([189.175.122.225]) by gator4166.hostgator.com (Horde Framework) with HTTPS; Tue, 28 Nov 2017 14:25:32 -0600 Date: Tue, 28 Nov 2017 14:25:32 -0600 Message-ID: <20171128142532.Horde.i2oBtHDOaD7XV1M3yAL7rga@gator4166.hostgator.com> From: "Gustavo A. R. Silva" To: Thomas Gleixner Cc: Alan Cox , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, LKML , Kees Cook Subject: Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs References: <20171127235253.GA20384@embeddedor.com> <20171128120512.Horde.1mz61Up1PsNtyHbrjWmK8L7@gator4166.hostgator.com> <20171128122235.Horde.vFP-9ZfAP0f9BFNePB8Z8xi@gator4166.hostgator.com> <20171128190032.2b1fa464@alans-desktop> In-Reply-To: User-Agent: Horde Application Framework 5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline 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: 108.167.133.22 X-Source-L: Yes X-Exim-ID: 1eJmRg-0007a9-52 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: gator4166.hostgator.com [108.167.133.22]:60691 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 2 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Thomas Gleixner : > On Tue, 28 Nov 2017, Alan Cox wrote: > >> > I have no idea who came up with that brilliant idea of parsing comments in >> > the code. It's so simple to make this parser completely fail that it's not >> >> Stephen Johnson (author of the V7 portable C compiler), which is where >> it's from (the lint tool). He also wrote yacc so he does know a bit about >> parsers 8). > > I don't doubt that. > >> > even funny anymore. >> >> The notation in question has been standard in tools like lint since the >> end of the 1970s > > Fair enough. > > Still that does not make the GCC implementation which defaults to take 'any > comment' as valid any better and does not solve other parsing issues which > have been pointed out in various GCC bugs. Using the macro annotation is > distinct and has no ifs and buts. > The thing about taking 'any comment' as valid is false if you add the following to your Makefile: KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough) This option takes the following comments as valid: /* fall through */ /* Fall through */ /* fall through - ... */ /* Fall through - ... */ Comments as fallthru, fallthrough, FALLTHRU are invalid. And of course if you intentionally change the option to: KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=1) it means that you obviously want to ignore any warning. Thanks -- Gustavo A. R. Silva From 1585342041888456712@xxx Tue Nov 28 20:13:08 +0000 2017 X-GM-THRID: 1585265423856272058 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread