gcc/libstdc++-v3/src
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
..
allocator-inst.cc
atomic.cc atomic.cc: Use noexcept. 2011-08-04 19:57:48 +00:00
bitmap_allocator.cc
chrono.cc chrono: (system_clock::is_steady): Update to N3291 from is_monotonic. 2011-07-21 03:27:51 +00:00
codecvt.cc
compatibility-c++0x.cc chrono: (system_clock::is_steady): Update to N3291 from is_monotonic. 2011-07-21 03:27:51 +00:00
compatibility-debug_list-2.cc
compatibility-debug_list.cc
compatibility-ldbl.cc
compatibility-list-2.cc
compatibility-list.cc
compatibility-parallel_list-2.cc
compatibility-parallel_list.cc
compatibility.cc
complex_io.cc
concept-inst.cc
condition_variable.cc
ctype.cc
debug.cc safe_unordered_sequence.h, [...]: Rename respectively in... 2011-07-21 19:56:36 +00:00
ext-inst.cc
fstream-inst.cc
functexcept.cc
functional.cc
future.cc future (launch): Update enumerators and define operators required for bitmask type. 2011-05-28 01:24:11 +01:00
globals_io.cc
hash_c++0x.cc
hash_tr1.cc
hash-long-double-aux.cc
hashtable_c++0x.cc
hashtable_tr1.cc
hashtable-aux.cc
ios_failure.cc
ios_init.cc
ios_locale.cc
ios-inst.cc
ios.cc
iostream-inst.cc
istream-inst.cc
istream.cc PR c++/33255 - Support -Wunused-local-typedefs warning 2011-09-08 15:54:24 +02:00
limits.cc
list.cc
locale_facets.cc
locale_init.cc
locale-inst.cc
locale.cc
localename.cc
Makefile.am
Makefile.in fragment.am (CONFIG_CXXFLAGS): Add -frandom-seed. 2011-07-22 13:52:51 +00:00
math_stubs_float.cc
math_stubs_long_double.cc
misc-inst.cc
mt_allocator.cc
mutex.cc
ostream-inst.cc
parallel_settings.cc
placeholders.cc
pool_allocator.cc
regex.cc
shared_ptr.cc
sstream-inst.cc
stdexcept.cc
streambuf-inst.cc
streambuf.cc
string-inst.cc
strstream.cc
system_error.cc system_error: Use noexcept. 2011-07-20 18:17:30 +00:00
thread.cc re PR libstdc++/49668 ([C++0x] std::thread does not forward its args as rvalues) 2011-07-09 11:13:01 +01:00
tree.cc
valarray.cc PR c++/33255 - Support -Wunused-local-typedefs warning 2011-09-08 15:54:24 +02:00
wlocale-inst.cc
wstring-inst.cc