This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/63657] [4.9/5 regression] -Wunused-variable: warning supressed by virtual dtor
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Nov 2014 02:22:10 +0000
- Subject: [Bug c++/63657] [4.9/5 regression] -Wunused-variable: warning supressed by virtual dtor
- Auto-submitted: auto-generated
- References: <bug-63657-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63657
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Sat Nov 22 02:21:35 2014
New Revision: 217957
URL: https://gcc.gnu.org/viewcvs?rev=217957&root=gcc&view=rev
Log:
PR c++/63657
PR c++/38958
* call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
if the temporary has a non-trivial destructor.
* decl.c (poplevel): Don't look through references.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wunused-var-22.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/decl.c