Message ID | 20240425140648.1407274-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=lTtdxDiC; 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=OkLjJk6v; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4VQHk742tsz1yZP for <incoming@patchwork.ozlabs.org>; Fri, 26 Apr 2024 00:07:41 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7CA5E3849AF5 for <incoming@patchwork.ozlabs.org>; Thu, 25 Apr 2024 14:07:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id ECE2A3858C98 for <gcc-patches@gcc.gnu.org>; Thu, 25 Apr 2024 14:07:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ECE2A3858C98 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 ECE2A3858C98 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1714054028; cv=pass; b=fnBBycRKh9KG4c5Ui2k+18kVeNATNb09XhSQjoFxtJ0Q8tZme7OiTJfNAlWpKsCXaQTyznOeC6eYFST/8CPxaP7CUU5Hgxxa3VBUKa4GySsVUdAGKkbxfiMpfEGMjTJO1qZ/ga16hQR3H/j2Bt9nUDNIwgVAv8OWO/wCUpEOwIU= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1714054028; c=relaxed/simple; bh=HAv4O68wh8rfLTsufQnoS1dGYkIxUXZ/IYkEsuu9K4w=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=osyqDw68XGgEzHeCIhUEROmkBDJsUWifSMEAMWBvpWCxn0zwfdaStc0DGC4xueK0tGKsqgeUjqeJ/rzMI5iwVcYn8Om/GAK3ryrl6ADAZh96awVWdvlBdtZrKE2Tk+7tBoDa1+nPzuirIcJp7fEs/OyQlmGMw806RiFbeIoBAgA= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43PE6vKO007531; Thu, 25 Apr 2024 14:07:05 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=ZtqSPD18URvE2Xf0ZV5sIoilEyMj/Q+EjFQ8UguoNIU=; b=lTtdxDiCWZWgdWdL1fumyUSfNrGc9LHXMUr144EEcBI2nwAs4cbwDQfYGOy/aEy2YU6d Sk0fOM2ZzX2W4uH802CzDMCt549WRcwbmmt6/Lehd+G0Hz8SzkR6MfpKRgHmOs6ZTynG iFeWCyfXn8RtEafSx0HbixjtG07fKIGqWnig8FiLPy1laFS3USsuOK8BWr/UfZIybFe3 Lm+v+rVvvON1mE/FV7dWfK0Mldsile9TgBq+XyIkwxUzci5zZdTZI6bYzNdKzvy42PGc jq1XobUEolGOHSEPwcCLmS3qJ1neAl7adMJdptTPl32S2RNgmp8SibUkh7T+P8NiM9KQ 3w== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xm4a2ka9a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Apr 2024 14:07:04 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 43PDNRpO035774; Thu, 25 Apr 2024 14:07:04 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xm45ad6kk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Apr 2024 14:07:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EiPEX1Gl7LZj7cMcri69O2jyNjKKzpIceu9x+aiCXyI5uWW7VwRcYjouO+YKl92uQkIdel9Qba72Hfq00/LiTTYyd5KZboZ8tAeO2NIIBP3Iu+ZIUzeird4bwSTOORpjS6YLd9UWlzVr0KnE5M98GqIGumpt2LWLXODmvQRSIlwuo/THwViZlQQhUkY3CqrgZVHCLkEYvfzSZoYjw5HyETM+6BIe4sv+xZGgrH9mcY1Rmj5czAaM4HJcsVh98v7sZe5oJG67SOfcbLGWEaJWdqOUkT8hEGjJXgSyCCJWrdw/jKmTMOB6EZtU5ABwAGs9N7QQpJPOOu8b7n0cEbxTJQ== 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=ZtqSPD18URvE2Xf0ZV5sIoilEyMj/Q+EjFQ8UguoNIU=; b=aCodyoW2g6N0FAtPJQelG0gop/5l/xhR01JjzgYlJDSHxY1aTxtDjpOf+eR2LdyItefnFNqpydub+6jJhFsQUnH00QCmnChNn2AwQVA4KnUo++TNyI2U1E09ECcCAML1JuIC/xiXWV2L+D2xBP9kHEC+EHnqJrdh7X9S9Lbpby/SACl6XNo4bLyWth32Xu98RNOdluBiqgUTwmUR7gkDlq3tSAq2b4Xa5ctwn0YrZ3+2iVN/ujHIDVgGy3Y5NnoLjGC66TC/yAIB3baqWIOr8/EKlxM5SYkHq21ac/mHtn733B+LK1WwRa2UBMjXilDjCpXRMRIkJut4EyFTBUIYVQ== 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=ZtqSPD18URvE2Xf0ZV5sIoilEyMj/Q+EjFQ8UguoNIU=; b=OkLjJk6vSi7yYvHHHdTzqpan7Ve54YZJOInZ77LxtS3lcnwTO5L8eCQ2UkdluOMsz3QUBFuc71Ct02BnhcGCaZwkVq2FzvLiuI9bUC+0MI2gWVXBpozqWHCA3oTT3ODaR2wNXp99ocaECaH21TdC71EH/DuDguqC0q2hL5EH28Q= Received: from CY8PR10MB6538.namprd10.prod.outlook.com (2603:10b6:930:5a::17) by PH7PR10MB6083.namprd10.prod.outlook.com (2603:10b6:510:1f9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Thu, 25 Apr 2024 14:06:56 +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.7472.045; Thu, 25 Apr 2024 14:06:56 +0000 From: Qing Zhao <qing.zhao@oracle.com> To: jason@redhat.com, richard.guenther@gmail.com, josmyers@redhat.com Cc: uecker@tugraz.at, siddhesh@gotplt.org, keescook@chromium.org, gcc-patches@gcc.gnu.org, Qing Zhao <qing.zhao@oracle.com> Subject: [PATCH v2 1/3] Allow flexible array members in unions and alone in structures [PR53548] Date: Thu, 25 Apr 2024 14:06:46 +0000 Message-Id: <20240425140648.1407274-2-qing.zhao@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240425140648.1407274-1-qing.zhao@oracle.com> References: <20240425140648.1407274-1-qing.zhao@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR02CA0025.namprd02.prod.outlook.com (2603:10b6:a02:ee::38) To CY8PR10MB6538.namprd10.prod.outlook.com (2603:10b6:930:5a::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR10MB6538:EE_|PH7PR10MB6083:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ba51db6-d7d7-4ebf-7941-08dc6530f74f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6PNT/DF2DpTQe1ZFhal1M6+ttlshGXw3fq9yl+GeECOkxY3Eiid2wZdb30fXQX/1sfrcgMeHAa33oM78XrrRhBiW/CHLJfFop0BFh343bE8ZtPdEil2xPcIvUZiMzNpcSGltwrpn3q/uEE2jv79sX4HHA025pt7LwZzFDo4WeBJ4kxJD/a+oCwqLb63dyeFRdQ3V3NNSm4ecGYKI8TWD8gKtQbqhj3GdYwrk7WLprLUfyU3TMRSGMJGhAsrLy7RSU5qBzaasGtM4mmQCftGmxTx/m9aUHRtH7hQyakfLQVDdbWZPBrKGMaMzgfoxDOf9ZGBGJfmBHaVfKtoOya9qg3TPxKLOYcUIQqQSCbqVD+Tyo3pk7pHhFpIX6QumVnF+LBC0B8xkyQhIXwQVwWUs5Gpfh8wynY8Ba++IhxdEZE79x0KFGnjT8tjkjNme0IssCSWkEC0RbXVPpfEDMpiK4+tOBzFSepzxvJOD/UJbaocaBtPlH8/NoLVo1Ny/T5SM/Gpu/lrYSAh4Lmp/NbqhheUgfwSZ5lCR0f+3hSbwVy/+q0v7KsKOaeXfuccYEuA+pnXBQOgjdNl+pVZkpdNSEQ2rU0Fx33JMyru8pQ43QEo46udRzokAjnfbSwho6RAeXOKN9zL99jvrKpf4GgtzNVxj3wETN0JbEnBEHT8YzgkoxlQZyuoGrVbPbeUxlMf68q14XHL0pa53vI0yinnmO3dKUhZN8gaT856kjpLv4khyU58rP+1CS05FQlhMwXXCygLO4oE/4OqNQ3Y3U7/y3NJ3QvcdOCXzMdxqg9esZU7c10W87wKBgNZjONELJiDVnE8WYCBNC0ehkDlqMwQYBZWg4YdUk62frzhwNLyFMwEDrgiMmrMwRfJPdOlERYaLkzBtWJmB6YdluauICp+MZpSwbba3igk3PyZr4/JYU9qnF7+O2KpJdqoDKCV7sLyp5JxD71HqqSNM3Y00nP6moqTd8gWNpWOfazrz0pBPm6dOlc9WF+pPjEMq4cehj5VtYGNU591fYLoGJNDIFN9c9d6uuCYrH5utvc4IAFj2QaGxCRNbH3T1goBJBLjX72e0CRyzIjAcp0B4851HkgrIiz8X36s6JxfGVts/XvQoflaeQKAiEFKChNgC2ddWvMcrcM40L9ddNHjZAy9XY9DM5AXrc5HRrelghDMSPs84cnT+KL06ycYKPrbFpZwugQ8Sg+70UH+nyMRmOwOR1PnhrfY5gATIwa99+uAXdlaUUmQMoTsfxD2f5nWBxe1czIqOM1E9RAOTAE1xeze/vZ06Wl89ddA/XzYVujcqY26evWo= 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)(1800799015)(376005)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iWgoj7dWY48kdiWetL/L7iBmsug+jVG86PrS1BW7mTQlmPfRwT6/TAd65oWST0azu4Vfh3DU3T84E8RMBcm//mIRAePJxjQ018hDmZQFu1yKJZdazu9xQJ2FXDdpHue/nJNpOj73OcvWR/djdYUx3/nBi6RNhwIo6UlhzDZ0Cg5sEkG1l4L2FMASc+Z3sDrifPOjJY7o42kPV5pKR0A8CJmC29hOdNrSz6Vbn+hogk5sFmPc7Dy/oy1p81pSkbjXA0KLYxPsQlVDxle5VPnea6m8qd3S6kMAKyezZYV27q3Ylhfaaf1/9n3YBu8xowD3g6PbX8MJaYHTX2btPEgmQmBAhVvThthOExGVpQHmeqmOG88C2kcT5YVk2RT8mi54HnFfr5G/KO5AfGyQSBA1y+5yoOSUoUFqZnpfN3cJPlz0j2bQmmAxSXun3/NNlRvT7ZY4hK+rxjWuaSA9tHcp2oswxNoEnZt/Hj4GNaW+A0a5ITaKrocw6mBlB6ESKBLlGEV8dvVH42zywKo0mOg0O1hMkYIc/nmYM+rgPsdRMxrUjW+XUanTsOLRGJxwClsCkP9BAKIJ5tSEytzvj2LI/LVpb0Qlnolo9bqE6ORJOjZbbAlxjC88ix+Wur1q6JrAEJF8MswefPX6q20xu0wqaCWlSukdw6up9elGQs4HrcX/WgliLZ9ilBbMcvr7XSF2GTWOesQBphOh0zcNvrfX0zbqw2Ty4IBnJpyLZrc1RGrgm3qeYgChyxP6rjdx6Bgipfm5JGD/gUQsF9IOhmql2/vYGNujdbqNidzqs20KRc0pPmIxQjBcIAaxc7nAisp8uEB+CoMdlXbehACae7TYnfOKNHtpEvhTkjqqR2J68cMKo69JwzP5IiviLuIiWwTVzme8CWV8Ln4YhdybxxWkYRwoU38eYYOOxFcozYSbvcUsjVwbQtLZK4BLiqiQvghSNof3mhpa/r6e0ic9VeBOC6VpoibAtXQApWzezfCUXtI+wkuPrxGbRyV1If9p+zKPg3dcLMBjsoUj6ohW6Z2uHTmvICBZzjNzwEyd037E0ZKs9GJDT6kPGW3mtQPms+tNzRu+TZBqKPpJJDnPUROAS94PSeI0aU9Gzl/TqcLh+dNK5D0LfUvdQEMMnn8KSVf4zscmEhsNeuxaNBQ2oQ7vs3PnWJF2gLXHlRlROpIvgulkI1xlT0AaWln1bwkDis/mftiIN4MjnOBbj8zkya6vqk3rjopfnQHce5A0PSE0tPwcvxYlpl+24ZWg1BnhNvSYiREsNUyGmvddLS/to3epmF01C9Ubt/1IMaX6gyfYtg139y0dd7E6rz+5bPDheAfNumakpbOEf3Z3dVDpChsG1sP3i7+IH0xJbTZxGhGkmjWBZAqE/USb5WkSln35F7duPQnulKcujPj1PQRZCq/8NtxatAmMufXsvshrBv19KghEZxpB0B6oWEc816IyXROIMoVwjM5WbnftWQroG4NpH3Obn0fDl45KqCaVwjGzqWDM5isD9GyBWSSPO75Lj0Bx8/f2UsFIiBjdVKyek0w2fbSKD66GUziNfhZ0iKmujdoKYnAHa5bIh5SrRhQTI7UC X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Tm7PnY0/ooWj6/7dbFwYPWq/O8gREkfUP9vhfrp4rBPe6OxFAbGq/NNWv+2o+BXknVYwCCR/VN3j4baMOjgUhc03NivUIqlUMHZ3PKCPz2yuL2JwRsa/WX1iqXOpqmS9C/cDY/KkizQQamwHmI+27zvplgZDcvzalORjan4ddJlMHsREuRrc9qmhKN+PdevJ1AqzBV01gBzzHDHuffLVbTBHeZ8zKA5nihCPTgvX+N31EOjpztCVW6NCyp944h0RQ2eSZMchtAphwle3WqpbJ83SGLL6m0GtXpVreM6FRYUVWVDqozIo+qxz1pr/0h/tyjYSrbQ6xheRart9Ohg4rctzsuZ56ZyBK7adZAM80j8IaKFYxqTf1LLXi3RB0I0tYXXCQEvay9KuGtGUmri02A5p6kQGJjKJAkNzpNghB98hRsvIS2OqbtLn/Lfaw1/3yuBVK850L1bTgPAU5K2yy620YAx8U6zd1CuHWC6vsYksB4+w9cFQ/PnnVBHKgT5qWbM0xOe4Tyc7eD3gzscpSu9Xp95F5dQ9M7G3wRFYfxiJP3NHeBYI/cpqYnKzpBiIqPHX2YAjTHPy+z0jGMKca8IMs01SxhgLdZlnOz2T4lQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ba51db6-d7d7-4ebf-7941-08dc6530f74f X-MS-Exchange-CrossTenant-AuthSource: CY8PR10MB6538.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2024 14:06:56.4603 (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: Q2FeHSaibAlIIaiGf7Kr2XUO0okWAg+5CqxgfC5ssw3ZM8nyRkxkp4GQKWq1n5IurRK0+MXRxvCcmW30edRFcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6083 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-04-25_13,2024-04-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404250102 X-Proofpoint-GUID: kpLdx-wEm0vSbKAbTRWsAYZaV-DlI2DQ X-Proofpoint-ORIG-GUID: kpLdx-wEm0vSbKAbTRWsAYZaV-DlI2DQ X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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..cba98c8aadd7 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 all the members of a union are flexible array member, the size of +such 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 structure gives the size zero. + @node Variable Length @section Arrays of Variable Length @cindex variable-length arrays