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
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| cpp | Loading commit data... | |
| dfp | Loading commit data... | |
| dwarf2 | Loading commit data... | |
| guality | Loading commit data... | |
| torture | Loading commit data... | |
| Wcast-qual-1.c | Loading commit data... | |
| Wconversion-real.c | Loading commit data... | |
| Wint-to-pointer-cast-1.c | Loading commit data... | |
| Wint-to-pointer-cast-2.c | Loading commit data... | |
| Wint-to-pointer-cast-3.c | Loading commit data... | |
| Wunused-local-typedefs.c | Loading commit data... | |
| Wunused-var-1.c | Loading commit data... | |
| Wunused-var-10.c | Loading commit data... | |
| Wunused-var-11.c | Loading commit data... | |
| Wunused-var-12.c | Loading commit data... | |
| Wunused-var-13.c | Loading commit data... | |
| Wunused-var-14.c | Loading commit data... | |
| Wunused-var-2.c | Loading commit data... | |
| Wunused-var-3.c | Loading commit data... | |
| Wunused-var-4.c | Loading commit data... | |
| Wunused-var-5.c | Loading commit data... | |
| Wunused-var-6.c | Loading commit data... | |
| Wunused-var-7.c | Loading commit data... | |
| Wunused-var-8.c | Loading commit data... | |
| Wunused-var-9.c | Loading commit data... | |
| asmgoto-1.c | Loading commit data... | |
| asmgoto-2.c | Loading commit data... | |
| asmgoto-3.c | Loading commit data... | |
| asmgoto-4.c | Loading commit data... | |
| attr-used-2.c | Loading commit data... | |
| attr-used.c | Loading commit data... | |
| builtin-offsetof.c | Loading commit data... | |
| cxxbitfields-2.c | Loading commit data... | |
| cxxbitfields-3.c | Loading commit data... | |
| cxxbitfields-4.c | Loading commit data... | |
| cxxbitfields-5.c | Loading commit data... | |
| cxxbitfields-6.c | Loading commit data... | |
| cxxbitfields.c | Loading commit data... | |
| fmax-errors.c | Loading commit data... | |
| fold-bitand-4.c | Loading commit data... | |
| int128-1.c | Loading commit data... | |
| int128-2.c | Loading commit data... | |
| int128-types-1.c | Loading commit data... | |
| pr20000.c | Loading commit data... | |
| pr33193.c | Loading commit data... | |
| pr36513-2.c | Loading commit data... | |
| pr36513.c | Loading commit data... | |
| pr41779.c | Loading commit data... | |
| pr41935.c | Loading commit data... | |
| pr42674.c | Loading commit data... | |
| pr43690.c | Loading commit data... | |
| pr43942.c | Loading commit data... | |
| pr44832.c | Loading commit data... | |
| pr46562-2.c | Loading commit data... | |
| pr46562.c | Loading commit data... | |
| raw-string-1.c | Loading commit data... | |
| raw-string-10.c | Loading commit data... | |
| raw-string-11.c | Loading commit data... | |
| raw-string-12.c | Loading commit data... | |
| raw-string-2.c | Loading commit data... | |
| raw-string-3.c | Loading commit data... | |
| raw-string-4.c | Loading commit data... | |
| raw-string-5.c | Loading commit data... | |
| raw-string-6.c | Loading commit data... | |
| raw-string-7.c | Loading commit data... | |
| raw-string-8.c | Loading commit data... | |
| raw-string-9.c | Loading commit data... | |
| restrict-1.c | Loading commit data... | |
| restrict-2.c | Loading commit data... | |
| restrict-4.c | Loading commit data... | |
| uninit-17.c | Loading commit data... | |
| uninit-D-O0.c | Loading commit data... | |
| uninit-D.c | Loading commit data... | |
| uninit-E-O0.c | Loading commit data... | |
| uninit-E.c | Loading commit data... | |
| uninit-F-O0.c | Loading commit data... | |
| uninit-F.c | Loading commit data... | |
| uninit-G-O0.c | Loading commit data... | |
| uninit-G.c | Loading commit data... | |
| vla-1.c | Loading commit data... | |
| warn-ommitted-condop.c | Loading commit data... |