From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2F9A93858D20; Fri, 2 Dec 2022 16:55:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F9A93858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670000109; bh=w4nwbiOYcQU+4PHXCFYYLAzb9mDDb66+jeHBB2O4c2I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QnK9twww+lrHJ/cSX4+2WeN/qVsWmuXYev8KlMpFCi0Jxh4EDjVDdMmhFA6JBVmeP eWaAHeiDlUuMJvn/JAc+NpcYQkdL9QkqIzCGaFFJorJ1pXpPhO0LjcW9dtyxA24Mhg XIlpMaTq8FHQfXFX0zxxmEKN9z5AxStDSzlNGb2Y= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107951] Invalid flexible array use not detected in nested structs by the C frontend Date: Fri, 02 Dec 2022 16:55:08 +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: 13.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE 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=3D107951 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek --- (In reply to qinzhao from comment #6) > after reading the history, my understanding is: >=20 > this gcc extension is added as a workaround to build glibc since glibc > source code has such usage of flexible array members; >=20 > my question is: why not changing the glibc source code instead? then we > don't need such workaround in GCC? Because after all those years, you don't really know if it is just glibc (w= hich likely doesn't do that anymore), but many other programs in the wild.=