summaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-28 12:51:30 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-28 12:51:30 +0000
commit48b74882d1b2639b02884681a82aa2be592052b2 (patch)
tree62e97833b7985d32ad245d045f3f22483e828606 /Makefile.in
parente3b5825b898ac1e299c2d42bb335e3528d368de7 (diff)
downloadppe42-gcc-48b74882d1b2639b02884681a82aa2be592052b2.tar.gz
ppe42-gcc-48b74882d1b2639b02884681a82aa2be592052b2.zip
PR c++/29028 - Missed unused warning on using declaration
In the example of the patch, g++ fails to warn that the variable N::i (introduced via a using declaration) is unused. This is because as we want to emit the warning in poplevel, when we walk the local bindings returned by getdecls, we forget that a VAR_DECL introduced by a using declaration is represented by a TREE_LIST which TREE_VALUE is the VAR_DECL, and we wrongly look for a bare VAR_DECL. Fixed thus and tested on x86_64-unknown-linux-gnu against trunk. gcc/cp/ * decl.c (poplevel<warn_unused*>): Do not forget that some local bindings are represented by a TREE_LIST. gcc/testsuite/ * g++.dg/warn/Wunused-var-18.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191829 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'Makefile.in')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud