From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD7533858C2B; Tue, 2 May 2023 19:49:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD7533858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683056999; bh=5kjZDQ4vOe/FTo2GePtPsPTeThtrwxyW818eIY4Fb1o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gzZqrdl0RYhSytQa/UwwpOszvwflUMiW+xC90GJn2+LmxC2HJy6mDrMn8Wjz6WT/A DJxMp9Sxk+dV7kJf+/uPa1XgUHIdiAm+eRTQR8yTnXwz5U9vbg/UZE5qmUb2BzFgNT exmJg6VriD7prbitbdaGO7PwxsgKLvYTuuN5yV9M= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109640] Spurious Wdangling-reference for argument to temporary lambda cast to rvalue reference Date: Tue, 02 May 2023 19:49:59 +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.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.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: 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=3D109640 --- Comment #4 from CVS Commits --- The releases/gcc-13 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:6b927b1297e66e26e62e722bf15c921dcbbd25b9 commit r13-7276-g6b927b1297e66e26e62e722bf15c921dcbbd25b9 Author: Marek Polacek Date: Tue May 2 15:48:40 2023 -0400 c++: Move -Wdangling-reference to -Wextra [PR109642] Sadly, -Wdangling-reference generates false positives for std::span-like user classes, and it seems imprudent to attempt to improve the heuristic in GCC 13. Let's move the warning to -Wextra, that will hopefully reduce the number of false positives the users have been seeing with 13. I'm leaving the warning in -Wall in 14 where I think I can write code to detect std::span-like classes. PR c++/109642 PR c++/109640 PR c++/109671 gcc/c-family/ChangeLog: * c.opt (Wdangling-reference): Move from -Wall to -Wextra. gcc/ChangeLog: * doc/invoke.texi: Document that -Wdangling-reference is enabled by -Wextra.=