public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Qing Zhao <qing.zhao@oracle.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: Nathan Sidwell <Nathan@acm.org>, jakub Jelinek <jakub@redhat.com>,
	richard Biener <rguenther@suse.de>,
	gcc Patches <gcc-patches@gcc.gnu.org>,
	martin Sebor <msebor@gmail.com>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [[GCC13][Patch][V3] 1/2] Add a new option -fstrict-flex-array[=n] and new attribute strict_flex_array
Date: Wed, 31 Aug 2022 14:00:33 +0000	[thread overview]
Message-ID: <FE1A2F0B-5306-46A3-A543-6F7632138B15@oracle.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2208302245520.446383@digraph.polyomino.org.uk>

Hi, Joseph,

Thanks a lot for your comment.

> On Aug 30, 2022, at 6:53 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> 
> On Tue, 30 Aug 2022, Qing Zhao via Gcc-patches wrote:
> 
>> Hi, Joseph and Nathan,
>> 
>> Could you please review the C and C++ FE parts of the patch?
>> 
>> https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599901.html
> 
> I think some work is still needed on the diagnostic wording.
> 
>> +  "%qE attribute may not be specified for a non array field",
> 
> "non-array" not "non array".

Okay.

> 
>> +       "not supported with a ISO C before C99", name);
> 
> "a ISO C" is not proper usage.  I think something like "by ISO C before 
> C99" would be better.  Likewise "a ISO C++".
> 
> "!flag_isoc99" is more usual than "flag_isoc99 == 0".

Okay.

> 
>> +       "not supported with a GNU extension GNU89", name);
> 
> "a GNU extension" suggests a particular language feature, but I think 
> you're actually referring here to a whole language version rather than an 
> individual feature.

Is “not supported by GNU extension GNU89” better?

> 
> In any case, -std=gnu89 supports flexible array members.

Yes, but only [0],[1] are supported as flexible array members.  The C99 flexible array member [] is not supported by GNU89, right?

Then, -fstrict-flex-arrays=3 is not supported by -std=gnu89.


>  So I'd expect 
> them to have exactly the same semantics as in C99, so disallowing a 
> particular feature for gnu89 here seems suspect.
> 
> In the manual, any literal code should be enclosed in @code{} or @samp{}.  
> That replaces the use of ASCII quotes "" that you currently have in the 
> documentation (that should never be used outside of @code, @samp and 
> similar).

Okay. Will update those places.
> 
>> +When -std=gnu89 is specified or C++ with GNU extension, only zero-length array
> 
> And @option{} should be used around "-std=gnu89" here (except as noted 
> above, I think it's suspect to disallow parts of this feature for gnu89).

Okay. Will update.
> 
>> +language. FOR ISO C before C99 and ISO C++, no language support for the flexible
> 
> "FOR" should be "For".

Okay.

thanks.

Qing
> 
> -- 
> Joseph S. Myers
> joseph@codesourcery.com


  reply	other threads:[~2022-08-31 14:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 14:40 Qing Zhao
2022-08-17 14:40 ` [[GCC13][Patch][V3] 2/2] Use array_at_struct_end_p in __builtin_object_size [PR101836] Qing Zhao
2022-08-26  8:49   ` Richard Biener
2022-08-26 13:37     ` Qing Zhao
2022-08-26  8:48 ` [[GCC13][Patch][V3] 1/2] Add a new option -fstrict-flex-array[=n] and new attribute strict_flex_array Richard Biener
2022-08-26 13:47   ` Qing Zhao
2022-08-29  8:04     ` Richard Biener
2022-08-30 20:30 ` Fwd: " Qing Zhao
2022-08-30 20:30   ` Qing Zhao
2022-08-30 22:53   ` Joseph Myers
2022-08-31 14:00     ` Qing Zhao [this message]
2022-08-31 17:21       ` Joseph Myers
2022-08-31 17:21         ` Joseph Myers
2022-08-31 18:55         ` Qing Zhao
2022-08-31 19:24           ` Qing Zhao
2022-08-31 19:29           ` Joseph Myers
2022-08-31 19:29             ` Joseph Myers
2022-08-31 19:47             ` Qing Zhao
2022-08-31 19:52               ` Joseph Myers
2022-08-31 20:06                 ` Qing Zhao
2022-08-31 20:09                   ` Joseph Myers
2022-08-31 20:16                     ` Qing Zhao
2022-08-31 20:35                       ` Qing Zhao
2022-08-31 22:23                         ` Kees Cook
2022-09-01  6:11                           ` Richard Biener
2022-09-04 14:17                             ` Qing Zhao
2022-08-31 22:17                       ` Kees Cook

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=FE1A2F0B-5306-46A3-A543-6F7632138B15@oracle.com \
    --to=qing.zhao@oracle.com \
    --cc=Nathan@acm.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=keescook@chromium.org \
    --cc=msebor@gmail.com \
    --cc=rguenther@suse.de \
    /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).