re PR java/8003 (gcj segfaults on simple java line of code)
authorTom Tromey <tromey@redhat.com>
Tue, 8 Oct 2002 18:05:54 +0000 (18:05 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 8 Oct 2002 18:05:54 +0000 (18:05 +0000)
* parse.y (variable_declarator_id): Simplify error path for
array declarator error.  For PR java/8003.

From-SVN: r57934

gcc/java/ChangeLog
gcc/java/parse.y

index 6c904ea0849ea9b4025b74c22f73e0b64c93b86b..057c9e1ed6ffcbf4dccd852d79c60a571e6eb8a9 100644 (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
index ff4ef2c0e195cba4fabaa63271492c9335801165..3cc58c9a5d82922e687057e5aeccdcad202f6347 100644 (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