From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C52F3858C33; Sun, 3 Mar 2024 10:23:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C52F3858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709461406; bh=ENfJxEvlq6KhevGk0Vm43+4Uv2XQRvn9zry5FJ+pr/o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=I3rqDhTkTuuF9WjGOl7DsjvoCkZ8aDmt/+fhVpK/tpFpm43jbnPVGjuReYRo1WTUk jif72YnflZXh+5ThVdNV256BEaq7myl3nprLrsJq4XSZEiGLvDzJtUvDxXgE0YK/EK LHgqHqHziOxutZ9GZOsY2GlMrP/qi2Rgrsoe3DA8= From: "dilyan.palauzov at aegee dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114220] False positive warning: possibly dangling reference to a temporary [-Wdangling-reference] Date: Sun, 03 Mar 2024 10:23:25 +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: 13.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: dilyan.palauzov at aegee dot 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: 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=3D114220 --- Comment #2 from =D0=94=D0=B8=D0=BB=D1=8F=D0=BD =D0=9F=D0=B0=D0=BB=D0=B0= =D1=83=D0=B7=D0=BE=D0=B2 --- Is my reading correct, that the warning is triggered, when a function recei= ves as parameter a reference to a temporary and returns a reference? If this is the only criterion, then it is a wrong assumption, that both references are somehow related.=