From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id F26A83858421 for ; Wed, 31 Aug 2022 17:21:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F26A83858421 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,278,1654588800"; d="scan'208";a="82335343" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 31 Aug 2022 09:21:40 -0800 IronPort-SDR: gkO5+eD1+C+7eL0hF20pQ0ND8Ifbc7bApp5omQSaFzxcLPsMPNtHupNdUyQEo9u/Fmbmldmg+P 3wc38s2ylQJoOzDL99zQTpAHph3cAAEaOUgxPygpR/ImpufYrXW3wPXIB6aMYLq7CU662zL5aB 1FofYx+A1uc5DQPa7L8gQfTPD5FNs28poHej/hYn8Y+VfPEna2q4h1veRMWpR/axY74txgQ7tU qxu+CzsF4o/yTWmq+HzWpJI2XDfJ59ZPXm9WrdI3L2LTeuPpd3zea84qPrt0H30B/ak6QeoWhD ZNI= Date: Wed, 31 Aug 2022 17:21:35 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Qing Zhao CC: jakub Jelinek , richard Biener , Kees Cook , gcc Patches , Nathan Sidwell , martin Sebor Subject: Re: [[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 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) 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, RCVD_IN_MSPIKE_H2, 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2022 17:21:44 -0000 Message-ID: <20220831172135.CJk8mwnWbXcdBiNaoTuOfU1F6zQoDacpZKixhZHK-QY@z> On Wed, 31 Aug 2022, Qing Zhao via Gcc-patches wrote: > > "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? There are no existing diagnostics referring to GNU89 at all. I don't think "GNU extension" needs to be mentioned in that diagnostic, but I also think that having that diagnostic at all is ill-conceived. > > 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? C99 flexible array members are fully supported in GNU89 mode. In general, any feature from a new language version that doesn't affect code that was valid in previous versions is likely to be accepted as an extension with options for older language versions. -- Joseph S. Myers joseph@codesourcery.com