diff options
author | Ranjit Mathew <rmathew@gcc.gnu.org> | 2005-10-03 17:30:38 +0000 |
---|---|---|
committer | Ranjit Mathew <rmathew@gcc.gnu.org> | 2005-10-03 17:30:38 +0000 |
commit | 9f1dfd16185a63d0586963d8d014385c05c087fc (patch) | |
tree | c32bc576698bcce682f98c5ff1db9a929ca446bb /gcc/java | |
parent | 198438344ceed3d2f91c0738d06b9ab06cf815aa (diff) | |
download | gcc-9f1dfd16185a63d0586963d8d014385c05c087fc.zip gcc-9f1dfd16185a63d0586963d8d014385c05c087fc.tar.gz gcc-9f1dfd16185a63d0586963d8d014385c05c087fc.tar.bz2 |
re PR java/24127 (ICE in libjava.compile/PR6865.java reported as "PASS" in testsuite.)
PR java/24127
* parse.y (method_header): Make the result of the rule a NULL_TREE
when a parsing error occurs.
From-SVN: r104899
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/parse.y | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index b227a68..549a742 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org> + + PR java/24127 + * parse.y (method_header): Make the result of the rule a NULL_TREE + when a parsing error occurs. + 2005-09-29 Tom Tromey <tromey@redhat.com> PR java/24120: diff --git a/gcc/java/parse.y b/gcc/java/parse.y index b728554..555541c 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -1034,26 +1034,31 @@ method_header: | type error { yyerror ("Invalid method declaration, method name required"); + $$ = NULL_TREE; RECOVER; } | modifiers type error { yyerror ("Identifier expected"); + $$ = NULL_TREE; RECOVER; } | VOID_TK error { yyerror ("Identifier expected"); + $$ = NULL_TREE; RECOVER; } | modifiers VOID_TK error { yyerror ("Identifier expected"); + $$ = NULL_TREE; RECOVER; } | modifiers error { yyerror ("Invalid method declaration, return type required"); + $$ = NULL_TREE; RECOVER; } ; |