From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A7C6D3858D32; Fri, 25 Aug 2023 23:21:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7C6D3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693005673; bh=YsA2z1koaVy/LSkRwADK0hhUM15EamVU//sBEHl+Bkw=; h=From:To:Subject:Date:From; b=PtzK8ZoUr5/uJGeXNF7bZCFf8Oqp7cpo19dNZwQB5AWp0KTPeiXYNho3PJAKVLbIm DtJdy4wjGtXdXgXbJhAnHHActw8WgxJ51NWY13WqUGkvxC1q9emoWYtqkrqeQ/nO47 fCefRF4yT+JLUSMpfdexBrxgRa6o1SpQnugMTwPs= From: "daniel at constexpr dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111159] New: [13 Regression] False positive -Wdangling-reference Date: Fri, 25 Aug 2023 23:21:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel at constexpr dot org 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D111159 Bug ID: 111159 Summary: [13 Regression] False positive -Wdangling-reference Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: daniel at constexpr dot org Target Milestone: --- GCC 13.2.0 as well as git from today report a false positive -Wdangling-reference warning for the following C++ code: struct A { int * i; int & b() { return *i; } }; int g =3D 42; A a() { return A{ &g }; } int main() { const int & i =3D a().b(); return i; }=