public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Qing Zhao <qing.zhao@oracle.com>
Cc: Richard Biener <rguenther@suse.de>,
	"joseph@codesourcery.com" <joseph@codesourcery.com>,
	gcc Patches <gcc-patches@gcc.gnu.org>,
	"siddhesh@gcc.gnu.org" <siddhesh@gcc.gnu.org>
Subject: Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.
Date: Fri, 18 Nov 2022 08:31:46 -0800	[thread overview]
Message-ID: <202211180829.4F995ED2@keescook> (raw)
In-Reply-To: <BF68D373-136E-43FC-BF39-DAE66F51A4A7@oracle.com>

On Fri, Nov 18, 2022 at 03:19:07PM +0000, Qing Zhao wrote:
> Hi, Richard,
> 
> Honestly, it’s very hard for me to decide what’s the best way to handle the interaction 
> between -fstrict-flex-array=M and -Warray-bounds=N. 
> 
> Ideally,  -fstrict-flex-array=M should completely control the behavior of -Warray-bounds.
> If possible, I prefer this solution.
> 
> However, -Warray-bounds is included in -Wall, and has been used extensively for a long time.
> It’s not safe to change its default behavior. 

I prefer that -fstrict-flex-arrays controls -Warray-bounds. That
it is in -Wall is _good_ for this reason. :) No one is going to add
-fstrict-flex-arrays (at any level) without understanding what it does
and wanting those effects on -Warray-bounds.

-- 
Kees Cook

  reply	other threads:[~2022-11-18 16:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 14:51 [PATCH 0/2] Add a new warning option -Wstrict-flex-array Qing Zhao
2022-11-08 14:51 ` [PATCH 1/2] Change the name of array_at_struct_end_p to array_ref_flexible_size_p Qing Zhao
2022-11-09  7:57   ` Richard Biener
2022-11-09 15:50     ` Qing Zhao
2022-11-08 14:51 ` [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays Qing Zhao
2022-11-15 15:41   ` Qing Zhao
2022-11-18 13:14   ` Richard Biener
2022-11-18 15:19     ` Qing Zhao
2022-11-18 16:31       ` Kees Cook [this message]
2022-11-21 15:02         ` Qing Zhao
2022-11-22  8:16           ` Richard Biener
2022-11-22 14:10             ` Qing Zhao
2022-11-22 15:02               ` Qing Zhao
2022-11-22 17:17                 ` Kees Cook
2022-11-24  6:45                   ` Richard Biener

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=202211180829.4F995ED2@keescook \
    --to=keescook@chromium.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=qing.zhao@oracle.com \
    --cc=rguenther@suse.de \
    --cc=siddhesh@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).