gcc/libstdc++-v3/include/ext
Dodji Seketeli 3797cb21ff PR c++/33255 - Support -Wunused-local-typedefs warning
gcc/

	* c-decl.c (lookup_name): Use the new
	maybe_record_typedef_use.
	(pushdecl): Use the new
	record_locally_defined_typedef.
	(store_parm_decls): Allocate cfun->language.
	(finish_function): Use the new maybe_warn_unused_local_typedefs,
	and free cfun->language.
	(c_push_function_context): Allocate cfun->language here only if
	needed.
	(c_pop_function_context): Likewise, mark cfun->language
	for collection only when it should be done.
	* c-common.c (handle_used_attribute): Don't ignore TYPE_DECL
	nodes.
	* c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new
	maybe_record_local_typedef_use.

gcc/c-family

	* c-common.h (struct c_language_function::local_typedefs): New
	field.
	(record_locally_defined_typedef, maybe_record_typedef_use)
	(maybe_warn_unused_local_typedefs): Declare new functions.
	* c-common.c (record_locally_defined_typedef)
	(maybe_record_typedef_use)
	(maybe_warn_unused_local_typedefs): Define new functions.
	* c.opt: Declare new -Wunused-local-typedefs flag.

gcc/cp

	* name-lookup.c (pushdecl_maybe_friend_1): Use the new
	record_locally_defined_typedef.
	* decl.c (finish_function): Use the new
	maybe_warn_unused_local_typedefs.
	(grokfield): Use the new record_locally_defined_typedef.
	* parser.c (lookup_name): Use the new maybe_record_typedef_use.

gcc/doc/

	* invoke.texi: Update documentation for -Wunused-local-typedefs.

gcc/testsuite/

	* g++.dg/warn/Wunused-local-typedefs.C: New test file.
	* c-c++-common/Wunused-local-typedefs.c: Likewise.

libstdc++-v3/

	* include/ext/bitmap_allocator.h
	(__detail::__mini_vector::__lower_bound): Remove unused typedef.
	* src/istream.cc (std::operator>>(basic_istream<char>& __in,
	basic_string<char>& __str)): Likewise.
	(std::getline): Likewise.
	* src/valarray.cc (__valarray_product): Likewise.

From-SVN: r178692
2011-09-08 15:54:24 +02:00
..
pb_ds user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-07 07:27:06 +00:00
algorithm user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-07 07:27:06 +00:00
alloc_traits.h alloc_traits.h (__allocator_always_compares_equal): New trait, provide partial specializations for known allocators. 2011-07-09 13:48:32 +01:00
array_allocator.h throw_allocator.h: Use noexcept. 2011-06-10 17:14:40 +00:00
atomicity.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
bitmap_allocator.h PR c++/33255 - Support -Wunused-local-typedefs warning 2011-09-08 15:54:24 +02:00
cast.h cast.h: Fix typo in include guard. 2011-07-09 11:28:56 +01:00
codecvt_specializations.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
concurrence.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
debug_allocator.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
enc_filebuf.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
extptr_allocator.h extptr_allocator.h (construct, destroy): Fix for C++0x mode by overloading to take allocator's pointer type. 2011-06-11 17:05:08 +01:00
functional user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-07 07:27:06 +00:00
iterator PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
malloc_allocator.h throw_allocator.h: Use noexcept. 2011-06-10 17:14:40 +00:00
memory user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-07 07:27:06 +00:00
mt_allocator.h throw_allocator.h: Use noexcept. 2011-06-10 17:14:40 +00:00
new_allocator.h throw_allocator.h: Use noexcept. 2011-06-10 17:14:40 +00:00
numeric In C++0x mode, import iota and is_sorted from namespace std into namespace __gnu_cxx to avoid ambiguous call errors. 2011-04-07 04:11:12 +00:00
numeric_traits.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
pod_char_traits.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
pointer.h cast.h: Fix typo in include guard. 2011-07-09 11:28:56 +01:00
pool_allocator.h throw_allocator.h: Use noexcept. 2011-06-10 17:14:40 +00:00
rb_tree PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
rc_string_base.h re PR c++/24163 (dependent Base class scope examined during unqualified name lookup in template) 2011-05-20 14:01:22 -04:00
rope re PR c++/24163 (dependent Base class scope examined during unqualified name lookup in template) 2011-05-20 14:01:22 -04:00
ropeimpl.h re PR c++/24163 (dependent Base class scope examined during unqualified name lookup in template) 2011-05-20 14:01:22 -04:00
slist PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
sso_string_base.h sso_string_base.h (__sso_string_base<>::_M_construct): Fix unqualified lookup. 2011-05-02 16:25:14 +00:00
stdio_filebuf.h user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-07 07:27:06 +00:00
stdio_sync_filebuf.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
string_conversions.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
throw_allocator.h throw_allocator.h: Use noexcept. 2011-06-10 17:14:40 +00:00
type_traits.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
typelist.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
vstring_fwd.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
vstring_util.h PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
vstring.h user.cfg.in (PDF_HYPERLINKS): To NO. 2011-08-07 07:27:06 +00:00
vstring.tcc basic_string.h: Use noexcept per the FDIS (minus compare(const string&)... 2011-05-31 12:50:31 +00:00