From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 6CFF9385B501 for ; Thu, 23 Feb 2023 21:24:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6CFF9385B501 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.97,322,1669104000"; d="scan'208";a="97862591" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 23 Feb 2023 13:24:16 -0800 IronPort-SDR: OD0s+Mio6z158+t2kYZcSBWwiSP2p8un7iO1bx1cnxgsIYllT7PFeC8AJaepNzwXswKM+1tjWn DFGeZJghhYca9Vf3qYvQ3Vq1SoijyRefQGYk44agkfX9p7gUcsES4AH0ubVN01geKqBaUVCaaC 6CjuLCFb7RwRZIuBFgemturwDfGbiTSOi+jKhk5kI8oxM0P4aoSa+kD4Olp/ZvalMJCj0bnDET 3YP6yavHEQu3Z8jp5x2u3Z3JuC20PMKN2erioRoGgrr84no1X2nGc7WwX/vgumtiYCDYzrPHSQ 3Qk= Date: Thu, 23 Feb 2023 21:24:09 +0000 From: Joseph Myers To: Qing Zhao CC: Richard Biener , Siddhesh Poyarekar , Kees Cook , Gcc Patches Subject: Re: Fwd: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650) In-Reply-To: <89D4C326-54FD-4403-8E54-6CE5B21AA411@oracle.com> Message-ID: <68c735b-90cc-14ef-be83-db1b754ad0f4@codesourcery.com> References: <20230211005013.789161-3-qing.zhao@oracle.com> <89D4C326-54FD-4403-8E54-6CE5B21AA411@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3107.9 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP 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 Thu, 23 Feb 2023, Qing Zhao via Gcc-patches wrote: > +@item > +The structure with a C99 flexible array member is the field of > +another union, for example: > + > +@smallexample > +struct flex1 @{ int length1; char data1[]; @} > +struct flex2 @{ int length2; char data2[]; @} > + > +union out_flex @{ struct flex1 flex_data1; struct flex2 flex_data2; @} I don't think this is an extension; structures with flexible array members are OK in unions in standard C. -- Joseph S. Myers joseph@codesourcery.com