From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 897513858D20; Thu, 26 Jan 2023 22:13:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 897513858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674771191; bh=1fidLPvNoSYipUC8CVY0Mki3EB3gHJqah7VHypo9W94=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tSybQI2a4pNSCla1xVZMg37UzHcvEtzf+i6lP1modKS/RGn3968cQ/yuE/j/xDdEM 7SO9pjLYnpok6OVdUdeGSFnc3aVpepjhz2NSLytUN9ssDxO3y1XxYbyjjPzZUJBh6n 5pXXNh+5gDuQDI9oby6UCnM96UW2gW+yzJxtHx7o= From: "qinzhao at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107952] tree-object-size: inconsistent size for flexible arrays nested in structs Date: Thu, 26 Jan 2023 22:13:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: qinzhao at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: siddhesh at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107952 --- Comment #19 from qinzhao at gcc dot gnu.org --- (In reply to rguenther@suse.de from comment #11) > > Agreed, usually where these extension should be documented? >=20 > They are usually documented in doc/extend.texi there is one section on "Zero Length" (Arrays of Length Zero), which mentio= ned this a little bit: "A structure containing a flexible array member, or a union containing such a structure (possibly recursively), may not be a member of a structure or an element of an array. (However, these uses are permitted by GCC as extensions.)" We might add one more sub-section inside this section to clarify how GCC handles the situation when a structure containing a flexible array member becomes a member of another structure.=20 is that a good place to put the documentation?=