This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: Fix for PR 6865
- From: Tom Tromey <tromey at redhat dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 11 Jun 2002 08:55:25 -0600
- Subject: Patch: FYI: Fix for PR 6865
- Reply-to: tromey at redhat dot com
I'm checking this in as obvious. This fixes PR 6865. It also fixes
the formatting for the method_header rule. I'll check in the test
case separately.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* parse.y (method_header): Give error message in all cases.
Fixes PR java/6865.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.383
diff -u -r1.383 parse.y
--- parse.y 4 Jun 2002 20:32:02 -0000 1.383
+++ parse.y 11 Jun 2002 14:40:05 -0000
@@ -1048,11 +1048,20 @@
RECOVER;
}
| modifiers type error
- {RECOVER;}
+ {
+ yyerror ("Identifier expected");
+ RECOVER;
+ }
| VOID_TK error
- {yyerror ("Identifier expected"); RECOVER;}
+ {
+ yyerror ("Identifier expected");
+ RECOVER;
+ }
| modifiers VOID_TK error
- {yyerror ("Identifier expected"); RECOVER;}
+ {
+ yyerror ("Identifier expected");
+ RECOVER;
+ }
| modifiers error
{
yyerror ("Invalid method declaration, return type required");