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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Mar 13 20:04:33 2019
New Revision: 269660

URL: https://gcc.gnu.org/viewcvs?rev=269660&root=gcc&view=rev
Log:
        PR c++/89660 - bogus error with -Wredundant-move.
        * typeck.c (maybe_warn_pessimizing_move): Only accept (T &) &arg
        as the std::move's argument.  Don't call convert_for_initialization
        when warn_redundant_move isn't on.

        * g++.dg/cpp0x/Wredundant-move8.C: New test.
        * g++.dg/cpp0x/Wredundant-move9.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/Wredundant-move8.C
    trunk/gcc/testsuite/g++.dg/cpp0x/Wredundant-move9.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to