+2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR java/13404
+ * parse.y: (catch_clause_parameter): Return early if $3, aka
+ formal_parameter, is null.
+
2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
* class.c: Remove uses of "register" specifier in
formal_parameter (CCBP). The formal parameter is
declared initialized by the appropriate function
call */
- tree ccpb = enter_block ();
- tree init = build_assignment
- (ASSIGN_TK, $2.location, TREE_PURPOSE ($3),
- build (JAVA_EXC_OBJ_EXPR, ptr_type_node));
- declare_local_variables (0, TREE_VALUE ($3),
- build_tree_list (TREE_PURPOSE ($3),
- init));
- $$ = build1 (CATCH_EXPR, NULL_TREE, ccpb);
- EXPR_WFL_LINECOL ($$) = $1.location;
+ tree ccpb;
+ tree init;
+ if ($3)
+ {
+ cppb = enter_block ();
+ init = build_assignment
+ (ASSIGN_TK, $2.location, TREE_PURPOSE ($3),
+ build (JAVA_EXC_OBJ_EXPR, ptr_type_node));
+ declare_local_variables (0, TREE_VALUE ($3),
+ build_tree_list
+ (TREE_PURPOSE ($3), init));
+ $$ = build1 (CATCH_EXPR, NULL_TREE, ccpb);
+ EXPR_WFL_LINECOL ($$) = $1.location;
+ }
+ else
+ {
+ $$ = error_mark_node;
+ }
}
| CATCH_TK error
{yyerror ("'(' expected"); RECOVER; $$ = NULL_TREE;}