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 installed for java warning


I installed the following patch to fix a java warning regression.

 > In file included from
 > ../../../egcs-CVS20000503/gcc/java/jcf-dump.c:1219:
 > ../../../egcs-CVS20000503/gcc/java/javaop.def: In function
 > 					       `disassemble_method':
 > ../../../egcs-CVS20000503/gcc/java/javaop.def:242: warning: int
 > 						   format, jint arg (arg 3)


2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
	specifiers in calls to fprintf.

diff -rup orig/egcs-CVS20000503/gcc/java/jcf-dump.c egcs-CVS20000503/gcc/java/jcf-dump.c
--- orig/egcs-CVS20000503/gcc/java/jcf-dump.c	Fri Apr 21 10:08:26 2000
+++ egcs-CVS20000503/gcc/java/jcf-dump.c	Thu May  4 11:43:10 2000
@@ -1197,10 +1197,10 @@ DEFUN(disassemble_method, (jcf, byte_ops
 
 #define SPECIAL_IINC(OPERAND_TYPE) \
   i = saw_wide ? IMMEDIATE_u2 : IMMEDIATE_u1; \
-  fprintf (out, " %d", i); \
+  fprintf (out, " %ld", (long) i); \
   INT_temp = saw_wide ? IMMEDIATE_s2 : IMMEDIATE_s1; \
   saw_wide = 0; \
-  fprintf (out, " %d", INT_temp)
+  fprintf (out, " %ld", (long) INT_temp)
 
 #define SPECIAL_WIDE(OPERAND_TYPE) \
   saw_wide = 1;

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