re PR c++/84364 (-Weffc++ warns on "return *this" in template after r253599)
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Feb 2018 21:40:35 +0000 (22:40 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 13 Feb 2018 21:40:35 +0000 (22:40 +0100)
commitdbf717037ba28223bb7910f999bded71d11538e1
tree1798758e6151b39d365d8c0f57bdd1901c12446a
parent8edd275b3f3d1dbd52d75fe86e1ebe814c545f1e
re PR c++/84364 (-Weffc++ warns on "return *this" in template after r253599)

PR c++/84364
* typeck.c (check_return_expr): Don't emit -Weffc++ warning
about return other than *this in assignment operators if
retval is type dependent expression.

* g++.dg/warn/effc4.C: New test.

From-SVN: r257640
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/effc4.C [new file with mode: 0644]