https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116731
--- Comment #3 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:6ac4e2f4b2ca9980670e7d3815a9140730df1005 commit r15-3905-g6ac4e2f4b2ca9980670e7d3815a9140730df1005 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>