From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D7B0C433E7 for ; Tue, 13 Oct 2020 19:08:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D14AC20E65 for ; Tue, 13 Oct 2020 19:08:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602616080; bh=EM4GBfxKTQMj47QgWsy8GdC130nGidSSNpq+tco0KGw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=JISpY+9S9fn0CQpNTE5G56C+/aFP47HoJb7AOZYqd0XUbEfjdwu0W0zdMgMDLq0sC HkZ6ymktZKNs2ywo5tt/rx8c96S0dykn2y7BYuBuSgKTMlzY6eIoqoyzgMegx8NkoX H7A0Y+1DEkvqJEdBrNciYSgwK59FCudPY3Dz/9AI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727654AbgJMTH7 (ORCPT ); Tue, 13 Oct 2020 15:07:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:58364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727033AbgJMTH7 (ORCPT ); Tue, 13 Oct 2020 15:07:59 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86CDF208D5; Tue, 13 Oct 2020 19:07:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602616078; bh=EM4GBfxKTQMj47QgWsy8GdC130nGidSSNpq+tco0KGw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E6GQKemhD6XOSM1sXIh8Zh7t4BqWCzE0JUnFj1hQ26QmYEp0KHyu129OtoJk6CNs4 KcqX888/qnnv1B/ohnAKcTdFgjeC6X+3QjHv1PVRXVWQ/bZJPZerjJTZ2K98ULaFEH DhA5P7jWx6EBKgI7GpUzr3Y3sMlCXoRYKozEuyf4= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 724174047F; Tue, 13 Oct 2020 16:07:56 -0300 (-03) Date: Tue, 13 Oct 2020 16:07:56 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Vasily Gorbik , Josh Poimboeuf , Peter Zijlstra , Stephen Rothwell , Ingo Molnar , Thomas Gleixner , Mark Rutland , Alexander Shishkin , Namhyung Kim , "H. Peter Anvin" , Masami Hiramatsu , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: [PATCH RESEND 1/1] perf build: Allow nested externs to enable BUILD_BUG() usage Message-ID: <20201013190756.GA3100363@kernel.org> References: <20201009112327.GC656950@krava> <20201009124111.GD656950@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201009124111.GD656950@krava> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Oct 09, 2020 at 02:41:11PM +0200, Jiri Olsa escreveu: > On Fri, Oct 09, 2020 at 02:25:23PM +0200, Vasily Gorbik wrote: > > Currently BUILD_BUG() macro is expanded to smth like the following: > > do { > > extern void __compiletime_assert_0(void) > > __attribute__((error("BUILD_BUG failed"))); > > if (!(!(1))) > > __compiletime_assert_0(); > > } while (0); > > > > If used in a function body this obviously would produce build errors > > with -Wnested-externs and -Werror. > > > > To enable BUILD_BUG() usage in tools/arch/x86/lib/insn.c which perf > > includes in intel-pt-decoder, build perf without -Wnested-externs. > > > > Reported-by: Stephen Rothwell > > Signed-off-by: Vasily Gorbik > > that one applied nicely ;-) thanks > > Acked-by: Jiri Olsa Thanks, applied. - Arnaldo