public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: David Laight <David.Laight@aculab.com>
Cc: 'Jakub Kicinski' <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: GCC 12 warnings
Date: Fri, 20 May 2022 16:30:52 -0700	[thread overview]
Message-ID: <202205201629.F743A84AB@keescook> (raw)
In-Reply-To: <8608c7da4cfc45889f450a538fb0b443@AcuMS.aculab.com>

On Fri, May 20, 2022 at 09:43:03PM +0000, David Laight wrote:
> From: Jakub Kicinski
> > Sent: 20 May 2022 18:24
> ...
> > > +ifeq ($(KBUILD_EXTRA_WARN),)
> > > +CFLAGS_kvaser_usb_hydra.o += -Wno-array-bounds
> > > +endif
> > 
> > Ah, thanks, I must have tried -Wno-array-bounds before I figured out
> > the condition and reverted back to full $(call cc-disable-warning, ..)
> > Let me redo the patches.
> 
> I think you need a check that the compiler actually supports
> -Wno-array-bounds.
> But that only needs be done once, not for every file
> that needs the option.

godbolt tells me that all kernel supported versions of GCC and Clang
handle -Wno-array-bounds. Let me know if there is a combination that
doesn't?

-- 
Kees Cook

      reply	other threads:[~2022-05-20 23:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  2:36 GCC 12 warnings Jakub Kicinski
2022-05-20 16:46 ` Kees Cook
2022-05-20 17:23   ` Jakub Kicinski
2022-05-20 21:43     ` David Laight
2022-05-20 23:30       ` Kees Cook [this message]

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=202205201629.F743A84AB@keescook \
    --to=keescook@chromium.org \
    --cc=David.Laight@aculab.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.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