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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Mar  6 15:34:50 2019
New Revision: 269427

URL: https://gcc.gnu.org/viewcvs?rev=269427&root=gcc&view=rev
Log:
        PR c++/87378 - bogus -Wredundant-move warning.
        * typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue
        overload resolution would actually succeed.

        * g++.dg/cpp0x/Wredundant-move1.C (fn4): Drop dg-warning.
        * g++.dg/cpp0x/Wredundant-move7.C: New test.

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

Reply via email to