All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Daniel Bristot de Oliveira <bristot@kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] Makefile: use -Wno-main in the full kernel tree
Date: Tue, 7 Sep 2021 15:42:02 -0700	[thread overview]
Message-ID: <73ee98a4-c4a5-04f3-6280-dcd67507d889@infradead.org> (raw)
In-Reply-To: <CAHk-=wgnvC=Tyejg_ts1O7yZYRxAgS+mxStCWM+PcyFPnaw1sw@mail.gmail.com>

On 8/16/21 5:33 PM, Linus Torvalds wrote:
> On Fri, Aug 13, 2021 at 2:01 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>>  From a quick google, it seems like '-Wmain' means something else for
>> clang. But it is probably ok.
> 
> So the warnings that clang gives with -Wmain seem to be much more reasonable.
> 
> Which makes me think that the '-Wno-main' thing would likely be better
> as a gcc-only thing.
> 
> Maybe something like this instead?
> 
>                Linus
> 

Linus,

Can we get your version of this patch merged?


Tested-by: Randy Dunlap <rdunlap@infradead.org>

Should I resend the full patch?

---
  Makefile | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index c19d1638da25..a33fba083df7 100644
--- a/Makefile
+++ b/Makefile
@@ -803,6 +803,8 @@ else
  # Disabled for clang while comment to attribute conversion happens and
  # https://github.com/ClangBuiltLinux/linux/issues/636 is discussed.
  KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=5,)
+# gcc inanely warns about local variables called 'main'
+KBUILD_CFLAGS += -Wno-main
  endif
  
  # These warnings generated too much noise in a regular build.


  parent reply	other threads:[~2021-09-07 22:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 22:41 [PATCH] Makefile: use -Wno-main in the full kernel tree Randy Dunlap
2021-08-14  0:01 ` Linus Torvalds
2021-08-14  0:29   ` Randy Dunlap
2021-08-17  0:33   ` Linus Torvalds
2021-08-17  0:38     ` Linus Torvalds
2021-08-17  1:01       ` Randy Dunlap
2021-08-17  1:31         ` Linus Torvalds
2021-08-17  2:05           ` Steven Rostedt
2021-08-21 23:26     ` Randy Dunlap
2021-09-07 22:42     ` Randy Dunlap [this message]
2021-08-16 15:08 ` Steven Rostedt

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=73ee98a4-c4a5-04f3-6280-dcd67507d889@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=bristot@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.