diff options
author | Alexandre Petit-Bianco <apbianco@redhat.com> | 2001-04-05 12:45:57 -0700 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2001-04-05 12:45:57 -0700 |
commit | 93a6eb7802d2a1e71430635a220df4663c4dd2ad (patch) | |
tree | e9446f7255204ff2ff4cf6ba1536b274c922bd86 /gcc | |
parent | 4956c16e5a3c5d199018f2a6c757ef9754120d2f (diff) | |
download | gcc-93a6eb7802d2a1e71430635a220df4663c4dd2ad.zip gcc-93a6eb7802d2a1e71430635a220df4663c4dd2ad.tar.gz gcc-93a6eb7802d2a1e71430635a220df4663c4dd2ad.tar.bz2 |
parse.y (resolve_qualified_expression_name): Pass field's DECL_CONTEXT to `not_accessible_p.'
2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (resolve_qualified_expression_name): Pass field's
DECL_CONTEXT to `not_accessible_p.'
(not_accessible_p): Changed parameters order in `inherits_from_p'
invokation.
(http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00326.html)
From-SVN: r41126
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/java/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/java/parse.y | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 252fc04..834aed6 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com> + + * parse.y (resolve_qualified_expression_name): Pass field's + DECL_CONTEXT to `not_accessible_p.' + (not_accessible_p): Changed parameters order in `inherits_from_p' + invokation. + 2001-03-27 Andrew Haley <aph@cambridge.redhat.com> * lang-options.h: Add flag_check_references. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 40e7801..4ab60e9 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -9434,7 +9434,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) /* Check on accessibility here */ if (not_accessible_p (current_class, field_decl, - TREE_TYPE (decl), from_super)) + DECL_CONTEXT (field_decl), from_super)) { parse_error_context (qual_wfl, @@ -9559,7 +9559,7 @@ not_accessible_p (reference, member, where, from_super) /* If where is active, access was made through a qualifier. Access is granted if the type of the qualifier is or is a sublass of the type the access made from (6.6.2.1.) */ - if (where && !inherits_from_p (where, reference)) + if (where && !inherits_from_p (reference, where)) return 1; /* Otherwise, access is granted if occuring from the class where |