diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-23 07:40:04 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-23 07:40:04 +0000 |
commit | 0638c4341faf188e902f4f98745069f9edf6449b (patch) | |
tree | d3c9d42deb43cc0a2a85375a47e5680b0096e26c /gcc/cp/pt.c | |
parent | a08df2f0eaa385c59b0b14aef72aae936dc25157 (diff) | |
download | gcc-0638c4341faf188e902f4f98745069f9edf6449b.tar.gz |
PR c++/25369
* g++.dg/template/ptrmem16.C: New test.
PR c++/25369
* tree.c (really_overloaded_fn): Tweak comment.
* pt.c (tsubst_call_declarator_parms): Remove.
(tsubst_copy): Call mark_used on the member referenced by an
OFFSET_REF.
* semantics.c (finish_qualified_id_expr): Simplify.
* decl2.c (mark_used): Accept BASELINKs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 9e610bf047c..93dad098689 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -144,7 +144,6 @@ static void check_specialization_scope (void); static tree process_partial_specialization (tree); static void set_current_access_from_decl (tree); static void check_default_tmpl_args (tree, tree, int, int); -static tree tsubst_call_declarator_parms (tree, tree, tsubst_flags_t, tree); static tree get_template_base (tree, tree, tree, tree); static int verify_class_unification (tree, tree, tree); static tree try_class_unification (tree, tree, tree, tree); @@ -6946,39 +6945,6 @@ tsubst_exception_specification (tree fntype, return new_specs; } -/* Substitute into the PARMS of a call-declarator. */ - -static tree -tsubst_call_declarator_parms (tree parms, - tree args, - tsubst_flags_t complain, - tree in_decl) -{ - tree new_parms; - tree type; - tree defarg; - - if (!parms || parms == void_list_node) - return parms; - - new_parms = tsubst_call_declarator_parms (TREE_CHAIN (parms), - args, complain, in_decl); - - /* Figure out the type of this parameter. */ - type = tsubst (TREE_VALUE (parms), args, complain, in_decl); - - /* Figure out the default argument as well. Note that we use - tsubst_expr since the default argument is really an expression. */ - defarg = tsubst_expr (TREE_PURPOSE (parms), args, complain, in_decl); - - /* Chain this parameter on to the front of those we have already - processed. We don't use hash_tree_cons because that function - doesn't check TREE_PARMLIST. */ - new_parms = tree_cons (defarg, type, new_parms); - - return new_parms; -} - /* Take the tree structure T and replace template parameters used therein with the argument vector ARGS. IN_DECL is an associated decl for diagnostics. If an error occurs, returns ERROR_MARK_NODE. @@ -8111,6 +8077,10 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) in response to the saved STMT_IS_FULL_EXPR_P setting. */ gcc_unreachable (); + case OFFSET_REF: + mark_used (TREE_OPERAND (t, 1)); + return t; + default: return t; } |