diff options
author | jsturm <jsturm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-03 03:58:50 +0000 |
---|---|---|
committer | jsturm <jsturm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-03 03:58:50 +0000 |
commit | 1bc82fc64b7a2ec2ad83424825b86bbca7fe183c (patch) | |
tree | 693c37bd0b2829bca5f844560b0d400e36f360a2 /gcc/java | |
parent | 5e836080ae96a64b071dcc79b1e6d6367e57a25d (diff) | |
download | ppe42-gcc-1bc82fc64b7a2ec2ad83424825b86bbca7fe183c.tar.gz ppe42-gcc-1bc82fc64b7a2ec2ad83424825b86bbca7fe183c.zip |
Fixes PR java/12866.
* parse.y (resolve_qualified_expression_name): Move test
for outer field access methods from here...
(check_thrown_exceptions) ...to here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73210 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/java/parse.y | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 77c171c17e3..fa42410e137 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2003-11-02 Jeff Sturm <jsturm@one-point.com> + + Fixes PR java/12866. + * parse.y (resolve_qualified_expression_name): Move test + for outer field access methods from here... + (check_thrown_exceptions) ...to here. + 2003-11-01 Kelley Cook <kcook@gcc.gnu.org> * .cvsignore: Delete. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 3f63300fbc5..448e0c8f233 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -9601,10 +9601,7 @@ resolve_qualified_expression_name (tree wfl, tree *found_decl, instantiation using a primary qualified by a `new' */ RESTORE_THIS_AND_CURRENT_CLASS; - /* EH check. No check on access$<n> functions */ - if (location - && !OUTER_FIELD_ACCESS_IDENTIFIER_P - (DECL_NAME (current_function_decl))) + if (location) { tree arguments = NULL_TREE; if (TREE_CODE (qual_wfl) == CALL_EXPR @@ -15783,6 +15780,10 @@ check_thrown_exceptions (int location, tree decl, tree this_expr) tree throws; int is_array_call = 0; + /* Skip check within generated methods, such as access$<n>. */ + if (OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (current_function_decl))) + return; + if (this_expr != NULL_TREE && TREE_CODE (TREE_TYPE (this_expr)) == POINTER_TYPE && TYPE_ARRAY_P (TREE_TYPE (TREE_TYPE (this_expr)))) |