From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754159AbdK1Tsr (ORCPT ); Tue, 28 Nov 2017 14:48:47 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:35379 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754087AbdK1Tsp (ORCPT ); Tue, 28 Nov 2017 14:48:45 -0500 Date: Tue, 28 Nov 2017 20:48:28 +0100 (CET) From: Thomas Gleixner To: "Gustavo A. R. Silva" cc: Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, LKML , Kees Cook , Linus Torvalds Subject: Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs In-Reply-To: <20171128125331.Horde.XUXRWEiZ7FMJv6yoDylZxN8@gator4166.hostgator.com> Message-ID: References: <20171127235253.GA20384@embeddedor.com> <20171128120512.Horde.1mz61Up1PsNtyHbrjWmK8L7@gator4166.hostgator.com> <20171128122235.Horde.vFP-9ZfAP0f9BFNePB8Z8xi@gator4166.hostgator.com> <20171128125331.Horde.XUXRWEiZ7FMJv6yoDylZxN8@gator4166.hostgator.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote: > This is what we want to add: > > # Warn about missing switch break or fall-through comment. > KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough) Can this be made to ignore comments and only accept the proper annotation? > > > 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 > > > even funny anymore. > > > > > I don't get why someone would want to do that to himself. :/ Well, it's not intentional. You add any comment and the parser thinks its correct. Or you typo the thing and it fails to recognize. Thanks, tglx