linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH] trace/osnoise: Do not use 'main' as variable name
Date: Wed, 8 Sep 2021 09:34:08 -0700	[thread overview]
Message-ID: <0e88250a-21ac-800b-e6e4-eb7dc459b04e@roeck-us.net> (raw)
In-Reply-To: <20210908115350.555941ba@oasis.local.home>

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

  parent reply	other threads:[~2021-09-08 16:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 15:14 [PATCH] trace/osnoise: Do not use 'main' as variable name Guenter Roeck
2021-09-08 15:53 ` Steven Rostedt
2021-09-08 16:09   ` Randy Dunlap
2021-09-08 16:34   ` Guenter Roeck [this message]
2021-09-08 16:35     ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e88250a-21ac-800b-e6e4-eb7dc459b04e@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=bristot@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).