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

2020-10-13 Thread Arnaldo Carvalho de Melo
Em Mon, Oct 12, 2020 at 08:59:36AM +1100, Stephen Rothwell escreveu: > Hi all, > > On Fri, 9 Oct 2020 14:41:11 +0200 Jiri Olsa wrote: > > > > 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 { > >

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

2020-10-13 Thread Arnaldo Carvalho de Melo
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) > >

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

2020-10-12 Thread Sedat Dilek
On Fri, Oct 9, 2020 at 8:35 PM Vasily Gorbik wrote: > > Currently BUILD_BUG() macro is expanded to smth like the following: Two feedbacks: #1: Greg KH told me to expand abbreviated words, here "smth = something". #2: Interesting to see an ASCII-art in the signature is causing such troubles. -

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

2020-10-11 Thread Stephen Rothwell
Hi all, On Mon, 12 Oct 2020 08:59:36 +1100 Stephen Rothwell wrote: > > On Fri, 9 Oct 2020 14:41:11 +0200 Jiri Olsa wrote: > > > > 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 { > > >

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

2020-10-11 Thread Stephen Rothwell
Hi all, On Fri, 9 Oct 2020 14:41:11 +0200 Jiri Olsa wrote: > > 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) > >

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

2020-10-09 Thread Jiri Olsa
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))) >

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

2020-10-09 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