https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86982
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Thu Sep 6 00:38:13 2018 New Revision: 264139 URL: https://gcc.gnu.org/viewcvs?rev=264139&root=gcc&view=rev Log: PR c++/86982, -Wreturn-local-addr and std::move and std::forward. * typeck.c (maybe_warn_about_returning_address_of_local): Handle calls to std::move or std::forward. (is_std_forward_p): New function. * g++.dg/warn/Wreturn-local-addr-5.C: New test. Added: trunk/gcc/testsuite/g++.dg/warn/Wreturn-local-addr-5.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/typeck.c trunk/gcc/testsuite/ChangeLog