This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/84364] [8 Regression] -Weffc++ warns on "return *this" in template after r253599
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Feb 2018 21:41:06 +0000
- Subject: [Bug c++/84364] [8 Regression] -Weffc++ warns on "return *this" in template after r253599
- Auto-submitted: auto-generated
- References: <bug-84364-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84364
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Feb 13 21:40:35 2018
New Revision: 257640
URL: https://gcc.gnu.org/viewcvs?rev=257640&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/warn/effc4.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog