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: Tobias Burnus <tobias@codesourcery.com>,
	Richard Biener <rguenther@suse.de>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Joseph Myers <joseph@codesourcery.com>
Subject: Re: Improve -Wflex-array-member-not-at-end changes.html wording |Plus: and warning bug? (was: [V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members.)
Date: Thu, 19 Oct 2023 16:29:07 -0700	[thread overview]
Message-ID: <202310191626.C0BF004C1@keescook> (raw)
In-Reply-To: <8DDFE1E7-DADE-4511-9A9E-F72C2F6B4C1E@oracle.com>

On Thu, Oct 19, 2023 at 08:49:00PM +0000, Qing Zhao wrote:
> > On Sep 25, 2023, at 2:24 PM, Tobias Burnus <tobias@codesourcery.com> wrote:
> > Secondly, if this is deprecated, shouldn't then the warning enabled by, e.g., -Wall or made
> > otherwise more prominent? (-std=?) - Currently, one either has to find the new flag or use
> > -pedantic.
> 
> Yes, agreed, However, I think that it might be better to delay this to next GCC release by giving users plenty time to fix all the -Wflex-array-member-not-at-end warnings.  As I know, linux kernel exposed a lot of warnings when adding -Wflex-array-member-not-at-end, and kernel people are trying to fix all these warnings in the source base.  

Yeah, for the code bases that use flexible arrays (C99 or GNU
Extension), there are cases where they're used as intentional implicit
unions, and the refactoring to make them unambiguous is non-trivial. I
think it may need to be some time before -Wflex-array-member-not-at-end
ends up in -Wall.

I gave some examples of this code pattern (and potential solutions)
here:
https://lore.kernel.org/lkml/202310161249.43FB42A6@keescook

-- 
Kees Cook

  reply	other threads:[~2023-10-19 23:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 14:22 [V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members Qing Zhao
2023-08-08  7:55 ` Richard Biener
2023-09-25 18:24 ` Improve -Wflex-array-member-not-at-end changes.html wording |Plus: and warning bug? (was: [V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members.) Tobias Burnus
2023-09-26  6:49   ` Richard Biener
2023-09-26  7:26     ` Improve -Wflex-array-member-not-at-end changes.html wording |Plus: and warning bug? Tobias Burnus
2023-10-02  3:58   ` Improve -Wflex-array-member-not-at-end changes.html wording |Plus: and warning bug? (was: [V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members.) Qing Zhao
2023-10-19 20:49   ` Qing Zhao
2023-10-19 23:29     ` Kees Cook [this message]
2024-05-04 11:11 ` [V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members Sebastian Huber
2024-05-06  7:08   ` Richard Biener
2024-05-06 13:29     ` Sebastian Huber
2024-05-06 14:20       ` Qing Zhao
2024-05-07 13:15         ` Sebastian Huber
2024-05-07 14:26           ` Qing Zhao
2024-05-07 17:57             ` Sebastian Huber
2024-05-07 18:34               ` Qing Zhao
2024-05-07 21:52                 ` Kees Cook
2024-05-08  7:25                   ` Richard Biener
2024-05-08 19:28                   ` Qing Zhao
2024-05-07 20:14               ` Qing Zhao

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=202310191626.C0BF004C1@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=tobias@codesourcery.com \
    /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).