------- Comment #8 from jason at gcc dot gnu dot org 2009-08-24 21:32 ------- Subject: Bug 41134
Author: jason Date: Mon Aug 24 21:31:54 2009 New Revision: 151061 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151061 Log: PR c++/41109 PR c++/41110 PR c++/41134 * cp-tree.h (DECL_ODR_USED): New macro. (struct lang_decl_base): Add odr_used flag. * decl.c (duplicate_decls): Propagate it. Use it for error. * pt.c (register_specialization): Use it for error. * decl2.c (mark_used): Use it as gating flag rather than TREE_USED. (cp_write_global_declarations): Use it for error. (tree_used_ok): Remove. * cp-tree.h: Remove tree_used_ok. * call.c (build_call_a): Don't call it. * init.c (build_offset_ref): Likewise. Added: trunk/gcc/testsuite/g++.dg/warn/Wunused-17.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c trunk/gcc/cp/cp-tree.h trunk/gcc/cp/decl.c trunk/gcc/cp/decl2.c trunk/gcc/cp/init.c trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41134