On Wed, 8 Sep 2021 08:14:07 -0700
Guenter Roeck <linux@xxxxxxxxxxxx> 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@xxxxxxxxxxxxxx/
For now, the workaround is this patch:
https://lore.kernel.org/all/20210813224131.25803-1-rdunlap@xxxxxxxxxxxxx/