aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-05-12 21:42:34 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-05-12 17:42:34 -0400
commit6eb3bb273d41fc53006e8c0c042433d41bdcb294 (patch)
tree92a30e7ea61540479bbab87c4470f8b7d7a37d52 /gcc/cp/call.c
parentb706d7f20d438d0cda4790a798d98d5cb74290f9 (diff)
downloadgcc-6eb3bb273d41fc53006e8c0c042433d41bdcb294.zip
gcc-6eb3bb273d41fc53006e8c0c042433d41bdcb294.tar.gz
gcc-6eb3bb273d41fc53006e8c0c042433d41bdcb294.tar.bz2
error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or DECL_NAMESPACE_SCOPE_P.
* error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or DECL_NAMESPACE_SCOPE_P. (lang_decl_name): Likewise. * pt.c (tsubst_friend_function, tsubst): Likewise. * decl.c (pushdecl, redeclaration_error_message, start_decl, cp_finish_decl, start_function): Likewise. * class.c (finish_struct_1): Likewise. * call.c (build_over_call): Likewise. (compare_ics): Use DERIVED_FROM_P. From-SVN: r19705
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 5eafd87..fa02408 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3294,14 +3294,12 @@ build_over_call (cand, args, flags)
we must be careful to do name lookup in the scope of
S<T>, rather than in the current class. */
- if (DECL_REAL_CONTEXT (fn)
- && TREE_CODE (DECL_REAL_CONTEXT (fn)) != NAMESPACE_DECL)
+ if (DECL_CLASS_SCOPE_P (fn))
pushclass (DECL_REAL_CONTEXT (fn), 2);
arg = tsubst_expr (arg, DECL_TI_ARGS (fn), NULL_TREE);
- if (DECL_REAL_CONTEXT (fn)
- && TREE_CODE (DECL_CONTEXT (fn)) != NAMESPACE_DECL)
+ if (DECL_CLASS_SCOPE_P (fn))
popclass (0);
}
converted_args = expr_tree_cons
@@ -3926,10 +3924,10 @@ compare_ics (ics1, ics2)
return -1;
}
else if (TREE_CODE (to2) == VOID_TYPE && IS_AGGR_TYPE (to1)
- && get_base_distance (to1, from1, 0, 0) != -1)
+ && DERIVED_FROM_P (to1, from1))
return 1;
else if (TREE_CODE (to1) == VOID_TYPE && IS_AGGR_TYPE (to2)
- && get_base_distance (to2, from2, 0, 0) != -1)
+ && DERIVED_FROM_P (to2, from2))
return -1;
if (! (IS_AGGR_TYPE (to1) && IS_AGGR_TYPE (to2)))