Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942564AbcJSOge (ORCPT ); Wed, 19 Oct 2016 10:36:34 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:39069 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934765AbcJSOga (ORCPT ); Wed, 19 Oct 2016 10:36:30 -0400 Date: Wed, 19 Oct 2016 13:31:16 +0200 From: Peter Zijlstra To: Richard Biener Cc: "Luis R. Rodriguez" , Vegard Nossum , Jiri Slaby , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Linus Torvalds , stable@vger.kernel.org, Ming Lei , Steven Rostedt , "H. Peter Anvin" , Josh Poimboeuf , Cesar Eduardo Barros , Michael Matz , David Miller , Guenter Roeck , Fengguang Wu , Borislav Petkov , Boris Ostrovsky , Juergen Gross , Kees Cook , Arnaldo Carvalho de Melo , Ingo Molnar , Thomas Gleixner Subject: Re: [PATCH 01/12] extarray: define helpers for arrays defined in linker scripts Message-ID: <20161019113116.GL3102@twins.programming.kicks-ass.net> References: <20161017090930.GT3142@twins.programming.kicks-ass.net> <55e00c01-2da8-8d06-1d05-9ebf775736ec@oracle.com> <20161017114517.GQ3117@twins.programming.kicks-ass.net> <55b3cbe0-f8fc-6505-411d-5f050d3414cc@oracle.com> <20161018211803.GV8651@wotan.suse.de> <20161019091347.GE3102@twins.programming.kicks-ass.net> <20161019102555.GJ3102@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 647 Lines: 14 On Wed, Oct 19, 2016 at 01:11:31PM +0200, Richard Biener wrote: > For C++ these kind of warnings trigger whenever abstraction penalty > is removed. Like the typical > > template foo () { if (i) { } } > > triggering for a hypothetical -Wdead-code for i == 0. The kernel > is known for its "C" abstraction stuff and I can believe that > such -W flag would trigger for cases where abstraction is removed. Sure, we very much rely on dead code elimination and constant propagation all over the place. I was mostly thinking about the specific case where it was triggered by alias analysis. I'm not sure how often we'd trigger that.