From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 0E90B385843D for ; Fri, 24 Feb 2023 00:56:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0E90B385843D 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="98041521" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 23 Feb 2023 16:56:06 -0800 IronPort-SDR: ghoVBXDdxmAzFxkkpDLICGWFp3lzPhp4fDwn0Bk8SC4vnDsAWgUJyp4JoURoVRqPW1y3lJU1Nv qyj5Cuowan8+Z52Xc3MBYhuPwRJ6DUO90N+Zm1gImGLjW8ddFZ9mFYxKW1mRAhrOv4jmrS6W5H gt3BpW5V7/DEIjaKLX8yUFd9j/H4vFCv4bA0HaT3X+aNlwy8V+0z6UNZXE1a/y4GjAOzuLYTyZ FIBYOAGQbD63oRiwrFd1yTv0UdQ2ZufYiOkO6LjM7LZsESWQSfL1JT4B5tib//mVH15srhALf/ /EQ= Date: Fri, 24 Feb 2023 00:56:02 +0000 From: Joseph Myers To: Qing Zhao CC: Richard Biener , Siddhesh Poyarekar , Kees Cook , Gcc Patches Subject: Re: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650) In-Reply-To: <501E355F-44A2-4B0F-B3A7-AFDD4BC0AAC6@oracle.com> Message-ID: References: <20230211005013.789161-3-qing.zhao@oracle.com> <89D4C326-54FD-4403-8E54-6CE5B21AA411@oracle.com> <68c735b-90cc-14ef-be83-db1b754ad0f4@codesourcery.com> <501E355F-44A2-4B0F-B3A7-AFDD4BC0AAC6@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-12.mgc.mentorg.com (139.181.222.12) 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: > But the following: > > struct flex1 { int length1; char data1[]; }; > struct flex2 { int length2; char data2[]; }; > union union_flex { struct flex1 f1; struct flex2 f2; }; /* this is C standard. */ > > struct out_flex { int n; union union_flex flex_data1;}; /* this is GNU extension. */ > > Should add this item into the documentation? "union that contains a structure with a flexible array member" is just like "structure with a flexible array member". I suppose the documentation should try to make that clear, without repeating it too much for every separate case. -- Joseph S. Myers joseph@codesourcery.com