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".
> + "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".
> + "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.
In any case, -std=gnu89 supports flexible array members. 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).
> +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).
> +language. FOR ISO C before C99 and ISO C++, no language support for the
> flexible
"FOR" should be "For".
--
Joseph S. Myers
[email protected]