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: warning reduction.


Some new warnings crept in. This patch I just committed fixes all of
them but one.

./A

Fri Feb 25 18:47:25 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
 	initialize locals to avoid warnings. Local `exception_type' moved
	into if statement.

Index: jcf-write.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/jcf-write.c,v
retrieving revision 1.48
diff -u -p -r1.48 jcf-write.c
--- jcf-write.c	2000/02/21 23:53:36	1.48
+++ jcf-write.c	2000/02/26 02:49:39
@@ -2302,8 +2302,11 @@ generate_bytecode_insns (exp, target, st
 	int worthwhile_finally = 1;
 	tree try_block = TREE_OPERAND (exp, 0);
 	tree finally = TREE_OPERAND (exp, 1);
-	tree return_link, exception_type, exception_decl;
+	tree return_link, exception_decl;
 
+	finished_label = finally_label = start_label = NULL;
+	return_link = exception_decl = NULL_TREE;
+
 	/* If the finally clause happens to be empty, set a flag so we
            remember to just skip it. */
 	if (BLOCK_EXPR_BODY (finally) == empty_stmt_node)
@@ -2311,6 +2314,7 @@ generate_bytecode_insns (exp, target, st
 
 	if (worthwhile_finally)
 	  {
+	    tree exception_type;
 	    return_link = build_decl (VAR_DECL, NULL_TREE,
 				      return_address_type_node);
 	    exception_type = build_pointer_type (throwable_type_node);

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