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]

Re: Questions on how to fix certain java dir warnings...


 > From: Per Bothner <bothner@cygnus.com>
 > 
 > > 1.  Here's a simple one, how its fixed is a matter of taste i guess. :-)
 > 
 > How about:
 >      * C is the first character following the '/' and '*'. */
 > 
 > > 2.  This one's probably a real bug.
 > >	I suspect these are cases where we should change == to =.
 > 
 > Yes.
 > 
 > > 3.
 > 
 > > 	All of these unused variables call functions in their
 > > initialization.  I need to know if the function called has any side
 > > effects that are being counted upon
 > 
 > None of them do.
 > 	--Per Bothner


	Okay, thanks for the feedback.  For the above issues I checked
in the following patch.


Index: ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/ChangeLog,v
retrieving revision 1.174
diff -u -p -r1.174 ChangeLog
--- ChangeLog	1999/03/27 16:17:08	1.174
+++ ChangeLog	1999/03/29 03:17:48
@@ -1,3 +1,15 @@
+Sun Mar 28 22:12:10 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* class.c (maybe_add_interface): Remove unused variable
+	`interface_binfo'.
+	(make_class_data): Use = for assignment, not ==.  Likewise.
+	(emit_register_classes): Remove unused variable `decl'.
+
+	* lex.c: Fix comment so as not to contain an embedded `/*'.
+
+	* verify.c (verify_jvm_instructions): Remove unused variable
+	`self_type'.	
+
 Sat Mar 27 15:49:18 1999  Per Bothner  <bothner@cygnus.com>
 
 	* parse.y (complete_loop_body):  Rename to finish_loop_body.
Index: class.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/class.c,v
retrieving revision 1.33
diff -u -p -r1.33 class.c
--- class.c	1999/03/21 06:09:03	1.33
+++ class.c	1999/03/29 03:17:51
@@ -333,7 +333,6 @@ maybe_add_interface (this_class, interfa
      tree this_class, interface_class;
 {
   tree basetype_vec = TYPE_BINFO_BASETYPES (this_class);
-  tree interface_binfo = make_tree_vec (6);
   int i;
   int n = TREE_VEC_LENGTH (basetype_vec);
   for (i = 0; ; i++)
@@ -1100,7 +1099,7 @@ make_class_data (type)
     {
       int super_index = alloc_class_constant (super);
       super = build_int_2 (super_index, 0);
-      TREE_TYPE (super) == ptr_type_node;
+      TREE_TYPE (super) = ptr_type_node;
     }
 
   /* Build and emit the array of implemented interfaces. */
@@ -1126,7 +1125,7 @@ make_class_data (type)
 	    {
 		int int_index = alloc_class_constant (iclass);
 		index = build_int_2 (int_index, 0);
-		TREE_TYPE (index) == ptr_type_node;
+		TREE_TYPE (index) = ptr_type_node;
 	    }
 	  init = tree_cons (NULL_TREE, index, init); 
 	}
@@ -1703,8 +1702,6 @@ register_class ()
 void
 emit_register_classes ()
 {
-  tree decl = getdecls ();
-
   extern tree get_file_function_name PROTO((int));
   tree init_name = get_file_function_name ('I');
   tree init_type = build_function_type (void_type_node, end_params_node);
Index: lex.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/lex.c,v
retrieving revision 1.27
diff -u -p -r1.27 lex.c
--- lex.c	1999/03/23 07:24:10	1.27
+++ lex.c	1999/03/29 03:17:57
@@ -379,7 +379,7 @@ java_lineterminator (c)
 }
 
 /* Parse the end of a C style comment.
- * C is the first character after the '/*'. */
+ * C is the first character following the '/' and '*'. */
 static void
 java_parse_end_comment (c)
      unicode_t c;
Index: verify.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/verify.c,v
retrieving revision 1.12
diff -u -p -r1.12 verify.c
--- verify.c	1999/03/21 06:09:24	1.12
+++ verify.c	1999/03/29 03:17:59
@@ -725,8 +725,6 @@ verify_jvm_instructions (jcf, byte_ops, 
 	field:
 	  {
 	    int index = IMMEDIATE_u2;
-	    tree self_type = get_class_constant
-	      (jcf, COMPONENT_REF_CLASS_INDEX (&current_jcf->cpool, index));
 	    tree field_signature = COMPONENT_REF_SIGNATURE (&current_jcf->cpool, index);
 	    tree field_type = get_type_from_signature (field_signature);
 	    if (is_putting)


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