From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 25CAC3857400; Fri, 8 Mar 2024 20:41:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25CAC3857400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709930512; bh=TweQ7nIRInHiyTLXpQNyrmltyDxuCow3DmX0Pv85J+Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=We0E7pzW8u/PjVXYgs21r+X7rwdIBvTT7SAPuZw64FoI+iUzc80ItSArNultL5ICZ weUG8QNgseNWp2+MDUA7T1bvJKJ4yDumwvRmoDa8eXUlteONB/JYTTVsD5Ez7vc91t t92gikKIygWLWL4PySSRbs3WlN1U0VdjYDYunb28= From: "kees at outflux dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/53548] allow flexible array members in unions like zero-length arrays Date: Fri, 08 Mar 2024 20:41:50 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: kees at outflux dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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: cc 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=3D53548 Kees Cook changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carlos at gcc dot gnu.org, | |kees at outflux dot net, | |ndesaulniers at google dot= com, | |qing.zhao at oracle dot com --- Comment #6 from Kees Cook --- There is still no way to use C99 flexible arrays in unions (or alone in structs) without syntactic obfuscation. The extension that already allows 0-sized arrays in unions should be extended to cover C99 arrays. This is especially important for projects migrating away from the various deprecated "fake" flexible array members to C99 flex array members, as they continue to depend on both union membership and single-member structs (i.e. the Linux kernel has lots of these, some even in UAPI).=