PR c++/87378 - bogus -Wredundant-move warning.
authorMarek Polacek <polacek@redhat.com>
Wed, 6 Mar 2019 15:34:50 +0000 (15:34 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 6 Mar 2019 15:34:50 +0000 (15:34 +0000)
commitec2de569275fe76e9f7e4ca931e987be5638359f
tree9678125a06a49ef50d03a5d32139f8fb18fad940
parent4661094069c52581fda8e3ae6493131df7d0b1e8
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.

From-SVN: r269427
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C
gcc/testsuite/g++.dg/cpp0x/Wredundant-move7.C [new file with mode: 0644]