Re: [PATCH 1/1] perf build: Allow nested externs to enable BUILD_BUG() usage

2020-10-09 Thread Vasily Gorbik
On Fri, Oct 09, 2020 at 01:23:27PM +0200, Jiri Olsa wrote: > On Fri, Oct 09, 2020 at 08:47:45AM +0200, Vasily Gorbik wrote: > > Currently BUILD_BUG() macro is expanded to smth like the following: ...snip... > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > > index 190be4fa5

Re: [PATCH 1/1] perf build: Allow nested externs to enable BUILD_BUG() usage

2020-10-09 Thread Jiri Olsa
On Fri, Oct 09, 2020 at 08:47:45AM +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))) >

[PATCH 1/1] perf build: Allow nested externs to enable BUILD_BUG() usage

2020-10-08 Thread Vasily Gorbik
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