OSDN Git Service

PR c++/41109
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 24 Aug 2009 21:31:54 +0000 (21:31 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 24 Aug 2009 21:31:54 +0000 (21:31 +0000)
commit411978d2740734b2c200d92136dc1a62a05b1b23
tree21f3fafc0a9586551eed28be49bc928210769cec
parentc6636ef7908cde85356f57a3261c1953a8dcd607
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151061 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/init.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wunused-17.C [new file with mode: 0644]