From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E54E338582B7; Mon, 29 Jan 2024 16:52:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E54E338582B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706547157; bh=w2K2HxeQCmiFLJcl0DPsv44pTGnWPnwLfC3RR02LtCg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vb5iyhOja/p3189weQWqxLTKSy2/xL3el2k1Eg26N2wYdARAT6orcEPSySDU8Gv7n 1zCuQ19GE1dxj+/e9Kc5AXCQoCvY3OMU9UZUd1PVIv+phQxAQ0c3cd66iC7mLAGWQE CE+r/qlOIsbiuKdtJUA4zK5hgy/BmVarLvMr+jJM= From: "bugdal at aerifal dot cx" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/113653] Failure to diagnose use of (non-constant-expr) const objects in static initializers Date: Mon, 29 Jan 2024 16:52:37 +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: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: bugdal at aerifal dot cx 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: resolution bug_status 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=3D113653 Rich Felker changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|DUPLICATE |--- Status|RESOLVED |UNCONFIRMED --- Comment #4 from Rich Felker --- This is NOT a duplicate of the marked bug - that bug was complaining that invalid code didn't compile. This bug is that GCC accepts invalid code, even with -pedantic, with no diagnostic, making it impossible to catch invalid C. This bug bit me in the wild - I accepted code that should have been rejected as a constraint violation, and thereby made the project impossible to compile with other compilers for a couple releases. In standards-conforming and/or pedantic mode, the code should be rejected.=