lkml.org 
[lkml]   [2020]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND 1/1] perf build: Allow nested externs to enable BUILD_BUG() usage
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 <sfr@canb.auug.org.au>
> > Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
>
> that one applied nicely ;-) thanks
>
> Acked-by: Jiri Olsa <jolsa@redhat.com>



Thanks, applied.

- Arnaldo

\
 
 \ /
  Last update: 2020-10-13 21:09    [W:0.076 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site