Go to file
Dodji Seketeli 3b4441db79 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.

From-SVN: r191829
2012-09-28 14:51:30 +02:00
boehm-gc
config
contrib contrib-list.mk (LIST): Remove arm-freebsd6, arm-linux, arm-ecos-elf, arm-rtems, arm-elf and arm-wince-pe. 2012-09-26 23:03:44 +01:00
fixincludes
gcc PR c++/29028 - Missed unused warning on using declaration 2012-09-28 14:51:30 +02:00
gnattools
include
INSTALL
intl
libada
libatomic
libbacktrace re PR bootstrap/54732 (Installation failure: libbacktrace rebuilds upon install when built with "make bootstrap-lean") 2012-09-28 06:13:00 +00:00
libcpp * sv.po: Update. 2012-09-26 22:47:46 +01:00
libdecnumber
libffi
libgcc
libgfortran
libgo
libgomp
libiberty
libitm
libjava
libmudflap
libobjc
libquadmath
libssp
libstdc++-v3 re PR libstdc++/54727 (error: declaration of ‘UINT64_C’ must be available) 2012-09-27 12:53:46 +00:00
lto-plugin
maintainer-scripts
zlib
ABOUT-NLS
ChangeLog Makefile.def: Make all-gcc depend on all-libbacktrace. 2012-09-26 12:38:08 +00:00
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def Makefile.def: Make all-gcc depend on all-libbacktrace. 2012-09-26 12:38:08 +00:00
Makefile.in Makefile.def: Make all-gcc depend on all-libbacktrace. 2012-09-26 12:38:08 +00:00
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.