From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 311D43858414; Sat, 20 Jan 2024 20:42:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 311D43858414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705783365; bh=ZAmL4dEnKQlfbgHcVPf9hg7BKL3LkFZEb9Zwy6Dfnh4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WxwxpHpDLQK+Dfr0R73e8XW+odbTGwv2w4jeRdBdbHzFOc0A/97EA4tjDjBs+zIpt 8OEUDj/TmCpU9Nxe51ZdJ49M0T5umIrNl6VJBBM5SS95j5SorQOEiODh48w6uY5EA4 q2c61cFdTs/OXM52efq4mrI1hhJP3vvYVzvbvIzo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111410] Bogus Wdangling-reference warning with ranges pipe expression in for loop Date: Sat, 20 Jan 2024 20:42: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: 14.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek 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=3D111410 --- Comment #2 from GCC Commits --- The trunk branch has been updated by Marek Polacek : https://gcc.gnu.org/g:7db802d972e622242d015ecd5a8cecf63e69a45a commit r14-8307-g7db802d972e622242d015ecd5a8cecf63e69a45a Author: Marek Polacek Date: Fri Jan 19 15:27:51 2024 -0500 libstdc++: suppress -Wdangling-reference with operator| [PR111410] It seems to me that we should exclude std::ranges::views::__adaptor::operator| from the -Wdangling-reference warning. It's commonly used when handling ranges. PR c++/111410 libstdc++-v3/ChangeLog: * include/std/ranges: Add #pragma to disable -Wdangling-referen= ce with std::ranges::views::__adaptor::operator|. gcc/testsuite/ChangeLog: * g++.dg/warn/Wdangling-reference17.C: New test.=