From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 30B643857735; Tue, 30 Jan 2024 16:44:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 30B643857735 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706633085; bh=1fzJAzZ/tYewZxEpCzIA3hA96Er/GWgBqMngbD9gp+4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HPyU6097FPuLB3aVsU/pQEBMRgCLYAWHFDeot1C08d+Z6NMHpOGlKzXw7NsGWf35k 6MpfKxPkylkrXpgZFYK7Fyf9XB+awLPwDJA5zxIQaPEQX5GFJHX2xrEWbfSaQGdI/z pRlbZvNJ0DBGldUMe67gPKbPEyjKplh9JTsIV5ek= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110075] Bogus -Wdangling-reference Date: Tue, 30 Jan 2024 16:44:43 +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.1.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: NEW 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: 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=3D110075 --- Comment #7 from Marek Polacek --- It's hard to decide. It seems that once we've covered std::span-like class= es, in practice the warning points out real issues. I would hope that code like you posted is actually fairly rare. But it's difficult to be sure.=