aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-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));