diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-16 17:42:56 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-16 17:42:56 +0000 |
commit | 67702eb899864e03a05b9cf0f0ef542533900d7c (patch) | |
tree | 9014dfecbe0670edc4ce4c440e01edcb80786afd /gcc/cp/init.c | |
parent | d6ab15112852d95d7cb9fe2d54c7fc39b03a44e0 (diff) | |
download | gcc-67702eb899864e03a05b9cf0f0ef542533900d7c.tar.gz |
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
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index ef18a6c1041..9dac7de400e 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1502,7 +1502,7 @@ build_offset_ref (tree type, tree member, bool address_p) gcc_assert (DECL_P (member) || BASELINK_P (member)); /* Callers should call mark_used before this point. */ - gcc_assert (!DECL_P (member) || TREE_USED (member)); + gcc_assert (!DECL_P (member) || tree_used_ok (member)); if (!COMPLETE_TYPE_P (complete_type (type)) && !TYPE_BEING_DEFINED (type)) |