From: Jason Merrill Date: Wed, 1 Mar 2000 05:45:44 +0000 (+0000) Subject: search.c (protected_accessible_p): Use context_for_name_lookup. X-Git-Tag: prereleases/libstdc++-2.92~7933 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e185aa1657b5846e27bcffdd594d714ddbe41efc;p=thirdparty%2Fgcc.git search.c (protected_accessible_p): Use context_for_name_lookup. * search.c (protected_accessible_p): Use context_for_name_lookup. * typeck.c (expand_ptrmemfunc_cst): Fix thinko. From-SVN: r32275 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index aab03ace51c6..aec6e4ef1681 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,6 +1,9 @@ 2000-02-29 Jason Merrill + * search.c (protected_accessible_p): Use context_for_name_lookup. + * init.c (construct_virtual_bases): Fix thinko. + * typeck.c (expand_ptrmemfunc_cst): Fix thinko. 2000-03-01 Martin von Loewis diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 751b633ef21a..56917eb374f0 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -997,7 +997,7 @@ protected_accessible_p (decl, derived, binfo) member of a base. (jason 2000/02/28) */ /* If DERIVED isn't derived from m's class, then it can't be a P. */ - if (!DERIVED_FROM_P (DECL_CONTEXT (decl), derived)) + if (!DERIVED_FROM_P (context_for_name_lookup (decl), derived)) return 0; access = access_in_type (derived, decl); diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index bb2de7478074..ceed9c56a333 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -6324,7 +6324,7 @@ expand_ptrmemfunc_cst (cst, delta, idx, pfn, delta2) if (!DECL_VIRTUAL_P (fn)) { if (!flag_new_abi) - *idx = convert (TYPE_PTRMEMFUNC_FN_TYPE (type), build_int_2 (-1, -1)); + *idx = build_int_2 (-1, -1); else *idx = NULL_TREE; *pfn = convert (TYPE_PTRMEMFUNC_FN_TYPE (type), build_addr_func (fn));