re PR c++/38958 ('unused variable' warning emitted when extending the lifetime of...
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 12 Jun 2013 21:36:36 +0000 (21:36 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 12 Jun 2013 21:36:36 +0000 (21:36 +0000)
commit6a0263647ee6694086e4dec1ee67094a31df10d9
tree945e6c45c18be6d4f64d894b68af55361fa825c7
parentef08b035900e8fc1cdcb2648dc6cd85169a43399
re PR c++/38958 ('unused variable' warning emitted when extending the lifetime of a returned RAII type by holding a reference to const despite delayed destructor side-effects. [dtor])

/cp
2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/38958
* decl.c (poplevel): For the benefit of -Wunused-variable see
through references.

/testsuite
2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/38958
* g++.dg/warn/Wunused-var-20.C: New.

From-SVN: r200042
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wunused-var-20.C [new file with mode: 0644]