]> git.ipfire.org Git - thirdparty/gcc.git/commit
Make TREE_USED match the [basic.def.odr] concept for FUNCTION_DECL and VAR_DECL...
authorJason Merrill <jason@redhat.com>
Sun, 16 Aug 2009 17:42:56 +0000 (13:42 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 16 Aug 2009 17:42:56 +0000 (13:42 -0400)
commit15305a736f7cb40174ae276912806eaf077de783
tree9014dfecbe0670edc4ce4c440e01edcb80786afd
parentd3ece023f3547db2d77a2d96ce0b8294815edcb3
Make TREE_USED match the [basic.def.odr] concept for FUNCTION_DECL and VAR_DECL...

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.

From-SVN: r150807
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]