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

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

https://gcc.gnu.org/g:a9f88741a99ba09b29cc0021499c63ca445393f0

commit r14-11415-ga9f88741a99ba09b29cc0021499c63ca445393f0
Author: Marek Polacek <pola...@redhat.com>
Date:   Tue Sep 17 16:58:37 2024 -0400

    c++: tweak for -Wrange-loop-construct [PR116731]

    This PR reports that the warning would be better off using a check
    for trivially constructible rather than trivially copyable.

    LLVM accepted a similar fix:
    https://github.com/llvm/llvm-project/issues/47355

            PR c++/116731

    gcc/cp/ChangeLog:

            * parser.cc (warn_for_range_copy): Check if TYPE is trivially
            constructible, not copyable.

    gcc/testsuite/ChangeLog:

            * g++.dg/warn/Wrange-loop-construct3.C: New test.

    Reviewed-by: Jason Merrill <ja...@redhat.com>
    (cherry picked from commit 6ac4e2f4b2ca9980670e7d3815a9140730df1005)

Reply via email to