This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Java: fixing a catch clause error handling problem


I checked in this patch to fix a catch clause error handling problem
reported here:

  http://sourceware.cygnus.com/ml/java-discuss/1999-q4/msg00358.html

./A

Tue Nov 23 10:55:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
 	in case of error. Error message tuned.

Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -p -r1.119 -r1.120
--- parse.y	1999/11/29 17:40:31	1.119
+++ parse.y	1999/11/29 20:43:24	1.120
@@ -1732,11 +1732,14 @@ catch_clause_parameter:
 		  EXPR_WFL_LINECOL ($$) = $1.location;
 		}
 |	CATCH_TK error
-		{yyerror ("'(' expected"); RECOVER;}
+		{yyerror ("'(' expected"); RECOVER; $$ = NULL_TREE;}
 |	CATCH_TK OP_TK error 
-		{yyerror ("Missing term or ')' expected"); DRECOVER (2);}
+		{
+		  yyerror ("Missing term or ')' expected"); 
+		  RECOVER; $$ = NULL_TREE;
+		}
 |	CATCH_TK OP_TK error CP_TK /* That's for () */
-		{yyerror ("')' expected"); DRECOVER (1);}
+		{yyerror ("Missing term"); RECOVER; $$ = NULL_TREE;}
 ;
 
 finally:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]