aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@casey.cygnus.com>2000-03-01 05:45:44 +0000
committerJason Merrill <jason@gcc.gnu.org>2000-03-01 00:45:44 -0500
commite185aa1657b5846e27bcffdd594d714ddbe41efc (patch)
tree17b7f5a85f5ee1692fabd3285d77a64d835d413f
parentba412f14ad13a1e71af1aebe1ee97c6591e1f12e (diff)
downloadgcc-e185aa1657b5846e27bcffdd594d714ddbe41efc.zip
gcc-e185aa1657b5846e27bcffdd594d714ddbe41efc.tar.gz
gcc-e185aa1657b5846e27bcffdd594d714ddbe41efc.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/search.c2
-rw-r--r--gcc/cp/typeck.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index aab03ac..aec6e4e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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>
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 751b633..56917eb 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 bb2de74..ceed9c5 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));