From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D80F03858D35; Fri, 21 Jul 2023 09:34:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D80F03858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689932098; bh=03eO0Ld3lDilPpNM4hU3POP6gKVpNDJug6Psn7I596I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=X0311bYlDhIezY1l69Sy9i/uMSUXK/cYQDXKAX5cnCE4gYJrhbQjGtC+gcDAVTVgg xsZ7mBs1wCGqah5zZz7t0nLEmZa9XhK+Wb4Mpj80mReELENGax7ixWEpvLWR23xFV3 XM7xou5mSUh4A6OT2MC/XMltNgdzPd3t4HmgRGwM= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110761] No warning for an uninitialized variable when used within its own initialization Date: Fri, 21 Jul 2023 09:34:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D110761 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Richard Biener --- Because g is only used conditionally and that condition is false. Does clang diagnose int g =3D 0 && g; ? if you write int g =3D 1 && g; we diagnose the use.=