lkml.org 
[lkml]   [2021]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] trace/osnoise: Do not use 'main' as variable name
From
Date
On 9/8/21 8:53 AM, Steven Rostedt wrote:
> On Wed, 8 Sep 2021 08:14:07 -0700
> Guenter Roeck <linux@roeck-us.net> wrote:
>
>> gcc 11.x may get a hiccup when encountering 'main' as variable name.
>>
>> kernel/trace/trace_osnoise.c: In function 'start_kthread':
>> kernel/trace/trace_osnoise.c:1515:8: error: 'main' is usually a function
>>
>> Use a different variable name to silence it.
>
> Egad, no. NACK! Double NACK. Linus already NACK'd this.
>
> (although it's ironic that he also added -Werror as the default :-/ )
>
> The bug in is in gcc, go send them a patch.
>
> THERE IS NO ISSUE WITH HAVING A LOCAL VARIABLE NAMED "main"!!!!
>
> This has already been discussed:
>
> https://lore.kernel.org/all/CAHk-=whHxeUjaNrWOLb0qx=-nibRZzQomwkw9xMPH_aHCf=BWQ@mail.gmail.com/
>
> For now, the workaround is this patch:
>
> https://lore.kernel.org/all/20210813224131.25803-1-rdunlap@infradead.org/
>

No problem. Sorry, I didn't find the other patch.

FWIW, it wasn't gcc 11.x, it was gcc 8.1, which is the only gcc version
that I can get to compile nds32 images (more recent versions either fail
to compile gcc, or fail to build the kernel with assembler errors).
I'll just stop build testing nds32:allmodconfig instead.

Guenter

\
 
 \ /
  Last update: 2021-09-08 18:35    [W:0.045 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site