Message ID | 20240501165226.2924144-2-qing.zhao@oracle.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=Df0839PJ; dkim=pass (1024-bit key; unprotected) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-oracle-onmicrosoft-com header.b=GonG02V8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VV36C22cbz1ydT for <incoming@patchwork.ozlabs.org>; Thu, 2 May 2024 02:53:07 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 74EBC384AB63 for <incoming@patchwork.ozlabs.org>; Wed, 1 May 2024 16:53:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 2E49B3858D3C for <gcc-patches@gcc.gnu.org>; Wed, 1 May 2024 16:52:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E49B3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2E49B3858D3C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1714582362; cv=pass; b=Jfbm39bx94VQQte4OEiiB9rp2IKVZy4f6oAjtDXLBaSOPuWr0sJjVMoClF46AzEBgt41wKqhnYJUJ3hzUPmbVY74X3wz93kJZqweZQDfWxG6itFE/jtxCjxtaLHM2PBELsf9loeDaw1qKQWtN6CHYOrAAnEiFr5VCL8cK3lympw= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1714582362; c=relaxed/simple; bh=6oUW2R+bJUBL/Zjg9LLO8CH/1RsLDlvHN9ogaFrF2bA=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=tzRUcjmIDkkY/p1kindnsQ62h+TYRP1hkXG6LUcQa0MAt6N8MvdA8mwGncZtUd4WkPkK77KjnsExvF67LHKCiw7oPsIA5szuov4+ovr5n8M1EhgzxVsTU9LlKcOQbawFm7bLrj/hJuVh4GryiyThfvTTgkOflzeTjkoAEV50cVw= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 441ASZqc026654; Wed, 1 May 2024 16:52:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=RfWS0bbbQXuQoMO30xR0U6tJET3SZVol5UI7GNAjA1M=; b=Df0839PJsNQypW+ziRRR1HpBhFZzHvD0mIG07OpAS4b+z7pYOsi56CigubIEjp/4Qayu 2l3xeKwaxBMabG0z6kqRENBFZ0zPb2DPqJf0uL4pY7BhFLe2XnXxpqMbkiq+CjMAmSNe bGzA936F1gw0xuS5hlUMmlYRgevAH9dDQhfVejGoxpK7QqQFyr9n+JByCy5FKbq4Ji6g fkR24ZURZu73nzsgXjorpbfOiExh9lJ6RB9lfoH9+p6SRzUYY8/WBHZ4750zCRp5rYpi 4Z7xCcqlSj8wizZySGvbPAF8Pk8ZlqiVOTL9v3NLfQgPVZJoZNrbAlCa+fi5YHPSSRu7 /A== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xrr54fm3s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 May 2024 16:52:39 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 441GX3MH008539; Wed, 1 May 2024 16:52:38 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xrqt9kpwe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 May 2024 16:52:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AbXpfUvxKas4SSNWW0beXbl4KbzF84vZjumRx2O0+px28ByP5Xd+ihBoUiTHDhohlTTuk/mdgdB1x0p0XiJFkCv7D4V/kIbKzUCSHUh6WS9tC2wBGqMZPQ/+sHV9MJ8nwUE0WG6H52sT6tgq+DNdYrar7hW9Ul//WE3Qoc6bEsaV5b7MScUxMwW4+Pcr52IhIOk9n4pa8UBlCT9L5DMp3dptDpvLZKIYGUn7Pg7w2FCJrCYkyNBM9wCgb+4QgFD22shvMcnEeq3IKjvq98EMYsB8gABL1Nt8shSGqJhOPL1g5S5SytwZ6BHKrIINm5RNvZidNsoPIkP4eP4n/OrWcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RfWS0bbbQXuQoMO30xR0U6tJET3SZVol5UI7GNAjA1M=; b=TxDHo/Ias3uW435J2JXRUgLEGKs5hTgXoIe/TvjaIO5uUGEmIcjuvZflTGuemiKS2U45DRqv9+sTNZC/Vm9hsXBugV5pMzB5+zArJkG9IBusr0veIOVs6ULbsD8gy/sCu0Rf3/HKE3idLKyjjtUx8eMgszMtnCefAKDxg2Ut6EsuU5rYDAQ44fAbreaU11mlQ8DZ25OEX+REL7gWG8694CDgRG2UozbdyvcHkwdy6A/c3uQj/qS0Sz3XgM7+7XjqxR5EGeht0R+WaV2GOE66chmb72FoZNaCoZHu1EHLi9IU5JSwmQe5jvZaC0TZH2pJOg4fcLtyYW8UQ/Q3m6YQkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RfWS0bbbQXuQoMO30xR0U6tJET3SZVol5UI7GNAjA1M=; b=GonG02V8J2ShHiYh0czXfKyTKTtJoPo6CW9bBz1q8uucySQYloqNeilLyPRHixBphQoo3SM2Q8CU4gyxl01Et7ANOGjU/JDpSrnJ1MdZtvomcMq+7SY0ARc93bNgUwE54WPAmK2flKf+1Ia14p0owl79iKvh1Qiwi/kki3KwxVg= Received: from CY8PR10MB6538.namprd10.prod.outlook.com (2603:10b6:930:5a::17) by BLAPR10MB4962.namprd10.prod.outlook.com (2603:10b6:208:327::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Wed, 1 May 2024 16:52:35 +0000 Received: from CY8PR10MB6538.namprd10.prod.outlook.com ([fe80::2dae:7852:9563:b4bc]) by CY8PR10MB6538.namprd10.prod.outlook.com ([fe80::2dae:7852:9563:b4bc%6]) with mapi id 15.20.7519.035; Wed, 1 May 2024 16:52:35 +0000 From: Qing Zhao <qing.zhao@oracle.com> To: jason@redhat.com, josmyers@redhat.com, richard.guenther@gmail.com, siddhesh@gotplt.org Cc: uecker@tugraz.at, keescook@chromium.org, gcc-patches@gcc.gnu.org, Qing Zhao <qing.zhao@oracle.com> Subject: [PATCH v5 1/4] Allow flexible array members in unions and alone in structures [PR53548] Date: Wed, 1 May 2024 16:52:23 +0000 Message-Id: <20240501165226.2924144-2-qing.zhao@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240501165226.2924144-1-qing.zhao@oracle.com> References: <20240501165226.2924144-1-qing.zhao@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO4P265CA0219.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:33a::17) To CY8PR10MB6538.namprd10.prod.outlook.com (2603:10b6:930:5a::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR10MB6538:EE_|BLAPR10MB4962:EE_ X-MS-Office365-Filtering-Correlation-Id: 0b1a091d-c425-49b4-5f04-08dc69ff1a11 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031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wNWlF3tzq2Zh9kfGgwnAo5NrZjvKYfeI1hp4wMIx4iyVE94lvmrl/mTbB5VDcT/PENgmcCsAY0Q2kgZpcifM1RRHL4rjvpLrMx5xPEDnfMNaEiRpATnvb6thN+h9ovi55RAsk1642KsFHoQcWt//Diwpu0CAFYp4pkyhXnMJWxyBiiMKYEyUHAqOVqGhL1Abw1+eu7cysmU2VEIW7jxRabTae9SwXdnQ2fJQPbd07z3AttFQf6kA8iTAkgJCa08s5x/mc7yuZwcTACJWkikJ2qo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY8PR10MB6538.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(376005)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hGYgDwp5f2JSB9JD3cju29J/Fu06h+3Le4AvFWXlmeMHFO+drIL7xccFLUtuCuuXSWFrLyHWDFd8H6/1KpKZyr5r+RzXrQOdaVlLCSspMSv9IRGhr9OJtYF++rzHV8jXh0aNU44cDjsxOWORv8sQ8Dj/AXy1Z1sBcO577vbzbvoaRdVmKpUcl2veHZi5qMNBwFtlYMLlWgWVZdX1eZx9Q3JojRBn0eqWQ/hrtdFH8CSzGcc6rslw3TDjdXbEgPPQhGREUgKA8lccUZnmv7ZDEdBQKBi/b/fgC3xLnVVpE1g9sJ/noWFPliik8EoG3ITC8AGjA2jWYMG/juUg+7AidrBY9/STdJqBe80ERvihpUWh2TbhqSyXP8oB+4B+owrjqIcdtyWis1+eMhmKVlKbRctE9Ik/W7B8+b0JGfGzwmznQyeGgKSpcybvZil7idToLWD2s2hfavkxo+W6m5DE4wayKufh3+OubbL2aMHXYRRzKx0c8FU+7+aSdgCrA4a8CCion5J7ajwi38sWO+pe+dDKCXRrqfGx3n3J8adBfveVPanVALnXpkZ7yhResgdFwPswtigNhtdhP1agqz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9D77JhzRbX5OFXmdJj/S80TyOlGJkyJzh6+qKZJM8jCeJ5fP6B8XgveKcVs3OJwHhj0AzWpOKm5NIgnNm0ZGzzxPHjM1Ku0WJWUBr8V9uXeo/yxnvHfxES6GxYkjWmKfh1ewBjcYDgNDb1O4dFshEE9LgYixbnxOUOM50JM/p0oqfQ7DJl3QPHih5M9ifmKAW1lD8QRlt41GkdJJ1b+3GXPSMpHktKvdsD0Nps46b0tcEnTo1nmdjE90sAz4I+ZqxAN5UzS4pcSoHrvImhpWKxQAKt6ig+DwL3muAcB4rb99I+VWWSi+Cj9pTruD6xp7AMgPZicptX9lIBjJ9D2/KLmVMoPgZIwqXtKyxNSVaaZEBqBpBdKu5N7xbxEyPsxvTOEpILXDzMeb11/+8n+V7nz00MecmRyCKpKy2bW8wzHEAOyK1Q6/KYtHCQb/TD20Mkc43T/cqe0OOEAQtdnOejr36V0h2G2S+7ee37qZXob4H/2F4axcAkxjoO2oD6npDmUg+6JQlcolb9g4jKzGaWHrQEFY17p9xCfJk7f5VacCrgdBr4DdzrX4dWOErOzNj9JItfZQ1X6vIDy14cxiY91aPFSpUxXC0h4BUnc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b1a091d-c425-49b4-5f04-08dc69ff1a11 X-MS-Exchange-CrossTenant-AuthSource: CY8PR10MB6538.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2024 16:52:35.7910 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j1hMouABDxHf4K+Y7+1y0JUsLd3pAF2EeYXtYVDTAF4Cw7ujbSQkC//G53Ef+qgIvNrsTJBHRR1QYZeg3kp0Ww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB4962 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-01_16,2024-04-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 adultscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2405010118 X-Proofpoint-ORIG-GUID: dhLuSE1Dlh3TDfBtTNQitsB5rBrhX4mu X-Proofpoint-GUID: dhLuSE1Dlh3TDfBtTNQitsB5rBrhX4mu X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org |
Series |
Allow flexible array members in unions and alone in structures [PR53548]
|
expand
|
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 7b54a241a7bf..94a77d7ef39c 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -42,6 +42,8 @@ extensions, accepted by GCC in C90 mode and in C++. * Named Address Spaces::Named address spaces. * Zero Length:: Zero-length arrays. * Empty Structures:: Structures with no members. +* Flexible Array Members in Unions:: Unions with Flexible Array Members. +* Flexible Array Members alone in Structures:: Structures with only Flexible Array Members. * Variable Length:: Arrays whose length is computed at run time. * Variadic Macros:: Macros with a variable number of arguments. * Escaped Newlines:: Slightly looser rules for escaped newlines. @@ -1873,6 +1875,38 @@ The structure has size zero. In C++, empty structures are part of the language. G++ treats empty structures as if they had a single member of type @code{char}. +@node Flexible Array Members in Unions +@section Unions with Flexible Array Members +@cindex unions with flexible array members +@cindex unions with FAMs + +GCC permits a C99 flexible array member (FAM) to be in a union: + +@smallexample +union with_fam @{ + int a; + int b[]; +@}; +@end smallexample + +If every member of a union is a flexible array member, the size of +such a union is zero. + +@node Flexible Array Members alone in Structures +@section Structures with only Flexible Array Members +@cindex structures with only flexible array members +@cindex structures with only FAMs + +GCC permits a C99 flexible array member (FAM) to be alone in a structure: + +@smallexample +struct only_fam @{ + int b[]; +@}; +@end smallexample + +The size of such a structure is zero. + @node Variable Length @section Arrays of Variable Length @cindex variable-length arrays