OSDN Git Service

Make TREE_USED match the [basic.def.odr] concept for FUNCTION_DECL
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 16 Aug 2009 17:42:56 +0000 (17:42 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 16 Aug 2009 17:42:56 +0000 (17:42 +0000)
commit67702eb899864e03a05b9cf0f0ef542533900d7c
tree9014dfecbe0670edc4ce4c440e01edcb80786afd
parentd6ab15112852d95d7cb9fe2d54c7fc39b03a44e0
Make TREE_USED match the [basic.def.odr] concept for FUNCTION_DECL
and VAR_DECL, so mark_used only has effect the first time.
* decl2.c (mark_used): Just return if TREE_USED is already set.
Don't set TREE_USED if cp_unevaluated_operand is set.
(tree_used_ok): New fn.
* init.c (build_offset_ref): Check it instead of TREE_USED.
* call.c (build_call_a): Likewise.
* cp-tree.h: Declare it.
(DECL_NO_LINKAGE_CHECKED): No longer needed.
(struct lang_decl_base): Remove no_linkage_checked bitfield.

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