From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5CE963858D38; Mon, 22 May 2023 19:11:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CE963858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684782682; bh=TjTR9AqMPQdeGJW4Oc9wfgQoIG3CtfZnNI31R48Og54=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cnxy8Wrf9zaCh+5OTwAUiJ4nPMiFT2i4M8lUTtn4+1PQ78A0XKnA9fhZAc/EbCQg8 Zw7zP29tFoKdWlyN9UuXxoSZD+5XtLl0qtVkWH9Oo0y1XEO8vqVPr/mVjEWXrVS5cV VoT8tag9m00H0vA2/FlsYXyEjV6UgkhnRPr01dEA= From: "alexhenrie24 at gmail dot com" 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:11:22 +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: alexhenrie24 at gmail dot com 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 #9 from Alex Henrie --- (In reply to Andrew Pinski from comment #7) > (In reply to Alex Henrie from comment #6) > > This wasn't fixed properly, or it was broken again before the release o= f GCC > > 8.1: In GCC 8.1 and later no warning at all is issued for the example > > program, even at -O0. >=20 > The fix was to change it to be a valid constant expression .... Oh, okay. When I read Comment 2 I thought that a -Wpedantic warning was intended. If the intention was to have no warning ever then everything is f= ine.=