From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 39F203858401; Fri, 27 Jan 2023 07:46:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39F203858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674805605; bh=uW3ZYhIpXFxITYs2Knjg3GPeMB0onGYNtykcpX44q70=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Z9uaDMqmDSYEa8oWrqDOJjZrxP8hYlYjFwQhnxkWOYNhzllulhdQK+wBP/++g6p3y J3QN38yKt3Og2L/fJAjBTA4Ht61XuG7Y9ZgvEAqwCJ/mrbyKCFncrDS80hgbzOjBuZ dzrOsppigDwLp2Ho1JkCw/8x3DWDR0jjg2WuvyQw= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107952] tree-object-size: inconsistent size for flexible arrays nested in structs Date: Fri, 27 Jan 2023 07:46:44 +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: rguenther at suse dot de 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 #20 from rguenther at suse dot de --- On Thu, 26 Jan 2023, qinzhao at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107952 >=20 > --- Comment #19 from qinzhao at gcc dot gnu.org --- > (In reply to rguenther@suse.de from comment #11) >=20 > > > Agreed, usually where these extension should be documented? > >=20 > > They are usually documented in doc/extend.texi >=20 > there is one section on "Zero Length" (Arrays of Length Zero), which ment= ioned > this a little bit: >=20 > "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.)" >=20 > 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 >=20 > is that a good place to put the documentation? Yes, I think so.=