From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 91689385AC12; Fri, 8 Mar 2024 07:25:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 91689385AC12 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709882733; bh=g/iKGBCSyh8YAOROOz4JxdWlmMj+QiALRLmkBPpi97U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qj3bGeSM5ocWXshwR56MoDYdml8P4f03nogbXSbXO6lj+d2LW9xsi5D+O/wIvT0wo s4BmRe3wKTVI87vqhE/LHlO35752bWvP2YlbhERGjVDVN7FgwUzzU83SvYcpCOmHdb Z328L50bc16JbxGHP6Yb6i+gixemVfT8UnyC60Bo= From: "daniel.lundin.mail at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/114266] No -pedantic diagnostic for zero-sized array in compound literals Date: Fri, 08 Mar 2024 07:25:33 +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: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.lundin.mail at gmail dot com X-Bugzilla-Status: NEW 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=3D114266 --- Comment #3 from Daniel Lundin --- (In reply to Joseph S. Myers from comment #2) > The relevant constraint here is "An array of unknown size shall not be > initialized by an empty initializer.". Indeed! I didn't realize it was also a constraint (C23 6.7.10). That probab= ly means that a diagnostic warning should always be given and not just in -pedantic mode.=