From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 6A8173831EEE for ; Tue, 30 Aug 2022 22:53:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6A8173831EEE Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,276,1654588800"; d="scan'208";a="84964435" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 30 Aug 2022 14:53:21 -0800 IronPort-SDR: VIm05q3SvfiKOjUUoj4K4G1WOuo53lvN8dA/0g5rJei84VC6ay3s88sJQdR52b5r+pGW1IstHC HaofLB+Lk+4BOzbot9uhlbNsr41T1i7elHr9n9UhfFOE0NznUoF/dBFZc23QRP08N+OsRWD0tt og3Ce1kMyuw4IZm5AwqcLWZNBMZIunzIVZeW+D+lPn/QqhtO7aayyyTTJU0PQjjSOvXumVSx+t DYHmoGFUo74Zr0Aogiy97lvoP+Acrxej/3Bcb9uFJdTFJXHSCBsmRmUQii/BYyqDB+lLsMnh1N gSY= Date: Tue, 30 Aug 2022 22:53:16 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Qing Zhao CC: Nathan Sidwell , jakub Jelinek , richard Biener , gcc Patches , martin Sebor , Kees Cook Subject: Re: Fwd: [[GCC13][Patch][V3] 1/2] Add a new option -fstrict-flex-array[=n] and new attribute strict_flex_array In-Reply-To: Message-ID: References: <20220817144042.2931674-1-qing.zhao@oracle.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3111.5 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 joseph@codesourcery.com