re PR java/6865 (gcj: segmentation fault on incorrect input)

* parse.y (method_header): Give error message in all cases.
	Fixes PR java/6865.

From-SVN: r54504
This commit is contained in:
Tom Tromey 2002-06-11 14:43:54 +00:00 committed by Tom Tromey
parent 1632a23685
commit 950ac1d321
2 changed files with 17 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2002-06-09 Tom Tromey <tromey@redhat.com>
* parse.y (method_header): Give error message in all cases.
Fixes PR java/6865.
2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
Don't use RTL inlining. Fix for PR java/6820.

View File

@ -1048,11 +1048,20 @@ method_header:
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");