From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F9D03857719; Wed, 24 May 2023 19:18:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F9D03857719 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684955926; bh=3ipHj5tORrCZQpDgvZ779B6fB8+sfk7LR4FMQaAKcek=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LDv9Nj5Z66SnAHGP40IehzQ7Ag45G4V+zx0Ay9jpbnX1OG40Ubh76N6CnNI/+b45h 3CyCbG6RjGG2qjElrdTIDDSWIL5qClgUe42roUYqICtYuH1of28OyIgqZq8X5xGHRY GrQTLusOEYDUy4kdBZ0EIK7ezSAvHl3PTPGhdhgw= 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: Wed, 24 May 2023 19:18:46 +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 #4 from Martin Uecker --- The concern would be that a program relying on the size of an object being larger may then have out of bounds accesses. But rereading the standard, I= am also not not seeing that this is required. (for the extension nothing is required anyway, but it should be consistent with it).=