From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 93D233858410; Mon, 22 May 2023 19:04:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93D233858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684782253; bh=x/DgluZNOb/iisix5LgtCtbY+w6gfH+hrOLkMMDwtkY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fTUfAr2u0IcHbXg0cuj2zzObrw9kvt9q5k5ZOe+olPNNKnA51Eq6DFnQKgHP/zWFb Vap48gAHR8Mi/tXoWZv1/ItA7wSskZSMECgHrEk7blZC1W708qrSpQbjmrMabfh+xW dxV0eXJ2+eQpxALi95euE8Kg1MmxqivGbxYPPMVI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/66618] Failure to diagnose non-constant initializer for static object with -O1 Date: Mon, 22 May 2023 19:04:13 +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: 4.8.4 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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=3D66618 --- Comment #7 from Andrew Pinski --- (In reply to Alex Henrie from comment #6) > This wasn't fixed properly, or it was broken again before the release of = GCC > 8.1: In GCC 8.1 and later no warning at all is issued for the example > program, even at -O0. The fix was to change it to be a valid constant expression ....=