re PR java/8003 (gcj segfaults on simple java line of code)

* parse.y (variable_declarator_id): Simplify error path for
	array declarator error.  For PR java/8003.

From-SVN: r57934
This commit is contained in:
Tom Tromey 2002-10-08 18:05:54 +00:00 committed by Tom Tromey
parent 36624850a4
commit 8f6d2e96a0
2 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2002-10-08 Tom Tromey <tromey@redhat.com>
* parse.y (variable_declarator_id): Simplify error path for
array declarator error. For PR java/8003.
2002-10-08 Zack Weinberg <zack@codesourcery.com>
* gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with

View File

@ -1000,12 +1000,7 @@ variable_declarator_id:
{yyerror ("Invalid declaration"); DRECOVER(vdi);}
| variable_declarator_id OSB_TK error
{
tree node = java_lval.node;
if (node && (TREE_CODE (node) == INTEGER_CST
|| TREE_CODE (node) == EXPR_WITH_FILE_LOCATION))
yyerror ("Can't specify array dimension in a declaration");
else
yyerror ("']' expected");
yyerror ("']' expected");
DRECOVER(vdi);
}
| variable_declarator_id CSB_TK error