https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111410

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>:

https://gcc.gnu.org/g:7db802d972e622242d015ecd5a8cecf63e69a45a

commit r14-8307-g7db802d972e622242d015ecd5a8cecf63e69a45a
Author: Marek Polacek <pola...@redhat.com>
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-reference
with
            std::ranges::views::__adaptor::operator|.

    gcc/testsuite/ChangeLog:

            * g++.dg/warn/Wdangling-reference17.C: New test.

Reply via email to