From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1D75B385843E; Fri, 26 May 2023 16:24:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D75B385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685118293; bh=xYXq5J+frp3ltaUBbFOw9DK2v3/+i4t0YdHiHewbq0w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lSo74Cpx82kXWznOGbyvusK5nkVKEElQXug/vhWkHdrwkpk8K7lx9xvQU3O+2GY0U KGWZRGVML2l47lk0/Zi1Th4xxBpiiJPat3AJ2B88t5TihpkGT5LTOxKwL7x2f/5tE+ 6K9DPktzdqaBYPMWaGdn/pPTw1Ru4U7uAaGQlRoU= From: "muecker at gwdg dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109956] GCC reserves 9 bytes for struct s { int a; char b; char t[]; } x = {1, 2, 3}; Date: Fri, 26 May 2023 16:24:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: trivial X-Bugzilla-Who: muecker at gwdg dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D109956 --- Comment #14 from Martin Uecker --- Maybe.=20 On the other hand, I wonder whether a struct with FAM should not rather alw= ays have the same size, and alignment, and representation as the corresponding struct with a conventional array. This would conceptually be cleaner, easie= r to understand, and less error prone.=