]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
search.c (protected_accessible_p): Use context_for_name_lookup.
authorJason Merrill <jason@casey.cygnus.com>
Wed, 1 Mar 2000 05:45:44 +0000 (05:45 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 1 Mar 2000 05:45:44 +0000 (00:45 -0500)
        * search.c (protected_accessible_p): Use context_for_name_lookup.

        * typeck.c (expand_ptrmemfunc_cst): Fix thinko.

From-SVN: r32275

gcc/cp/ChangeLog
gcc/cp/search.c
gcc/cp/typeck.c

index aab03ace51c62c7892a61e5497f7ca32e5a34ac9..aec6e4ef168151e43a91f4b0347d8ed01cd082fe 100644 (file)
@@ -1,6 +1,9 @@
 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
 
+       * 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  <loewis@informatik.hu-berlin.de>
 
index 751b633ef21a20564a0ba53848888afeeb846470..56917eb374f064aa2e72a5e8fcda14095e5cfdab 100644 (file)
@@ -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);
index bb2de7478074b5017b26290b9984e3c4dcbd833b..ceed9c56a333dfbdfe623d950b9f9ed9a5e3c191 100644 (file)
@@ -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));