diff options
author | Per Bothner <per@bothner.com> | 2004-02-08 23:41:55 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2004-02-08 23:41:55 -0800 |
commit | e333a61815b7ced28c4bc1337040b123c54c488f (patch) | |
tree | a53656fb149e55e2429cbfc5c7bd4f74f72648b8 /gcc/java | |
parent | f19e9e4d1645adcc0182a92bda294f45021419be (diff) | |
download | gcc-e333a61815b7ced28c4bc1337040b123c54c488f.zip gcc-e333a61815b7ced28c4bc1337040b123c54c488f.tar.gz gcc-e333a61815b7ced28c4bc1337040b123c54c488f.tar.bz2 |
parse.y (resolve_qualified_expression_name): In case of inaccessible class don't use not_accessible_field_error...
* parse.y (resolve_qualified_expression_name): In case of inaccessible
class don't use not_accessible_field_error, which can get confused.
From-SVN: r77525
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/parse.y | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 23a2cdb..2132bc4 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2004-02-08 Per Bothner <per@bothner.com> + + * parse.y (resolve_qualified_expression_name): In case of inaccessible + class don't use not_accessible_field_error, which can get confused. + 2004-02-05 Kelley Cook <kcook@gcc.gnu.org> Make-lang.in (po-generated): Delete. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 93755ea..390b8cd 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -9869,7 +9869,14 @@ resolve_qualified_expression_name (tree wfl, tree *found_decl, } if (not_accessible_p (TREE_TYPE (decl), decl, type, 0)) - return not_accessible_field_error (qual_wfl, decl); + { + parse_error_context + (qual_wfl, "Can't access %s class '%s' from '%s'", + java_accstring_lookup (get_access_flags_from_decl (decl)), + IDENTIFIER_POINTER (DECL_NAME (decl)), + IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); + return 1; + } check_deprecation (qual_wfl, decl); type = TREE_TYPE (decl); |