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]
Other format: [Raw text]

Patch installed for i960.c warnings


Patch tested via cross-compiling i960.o targetted for
i960-unknown-aout i960-unknown-coff i960-unknown-rtems.

Installed as obvious.


2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* i960.c (i960_output_function_prologue, i960_print_operand,
	i960_print_operand_addr): Fix format specifier warnings.

diff -rup orig/egcc-CVS20030516/gcc/config/i960/i960.c egcc-CVS20030516/gcc/config/i960/i960.c
--- orig/egcc-CVS20030516/gcc/config/i960/i960.c	2003-05-09 20:01:36.000000000 -0400
+++ egcc-CVS20030516/gcc/config/i960/i960.c	2003-05-16 15:20:15.824244052 -0400
@@ -1459,9 +1459,11 @@ i960_output_function_prologue (file, siz
   if (actual_fsize > 0)
     {
       if (actual_fsize < 32)
-	fprintf (file, "\taddo	%d,sp,sp\n", actual_fsize);
+	fprintf (file, "\taddo	" HOST_WIDE_INT_PRINT_DEC ",sp,sp\n",
+		 actual_fsize);
       else
-	fprintf (file, "\tlda\t%d(sp),sp\n", actual_fsize);
+	fprintf (file, "\tlda\t" HOST_WIDE_INT_PRINT_DEC "(sp),sp\n",
+		 actual_fsize);
     }
 
   /* Take hardware register save area created by the call instruction
@@ -1488,12 +1490,12 @@ i960_output_function_prologue (file, siz
       if (nr == 3 && regs[i+3] == -1)
 	nr = 4;
 
-      fprintf (file,"\tst%s	%s,%d(fp)\n",
+      fprintf (file,"\tst%s	%s," HOST_WIDE_INT_PRINT_DEC "(fp)\n",
 	       ((nr == 4) ? "q" :
 		(nr == 3) ? "t" :
 		(nr == 2) ? "l" : ""),
 	       reg_names[i], offset);
-      sprintf (tmpstr,"\tld%s	%d(fp),%s\n",
+      sprintf (tmpstr,"\tld%s	" HOST_WIDE_INT_PRINT_DEC "(fp),%s\n",
 	       ((nr == 4) ? "q" :
 		(nr == 3) ? "t" :
 		(nr == 2) ? "l" : ""),
@@ -1508,10 +1510,12 @@ i960_output_function_prologue (file, siz
     return;
 
   fprintf (file, "\t#Prologue stats:\n");
-  fprintf (file, "\t#  Total Frame Size: %d bytes\n", actual_fsize);
+  fprintf (file, "\t#  Total Frame Size: " HOST_WIDE_INT_PRINT_DEC " bytes\n",
+	   actual_fsize);
 
   if (lvar_size)
-    fprintf (file, "\t#  Local Variable Size: %d bytes\n", lvar_size);
+    fprintf (file, "\t#  Local Variable Size: " HOST_WIDE_INT_PRINT_DEC
+	     " bytes\n", lvar_size);
   if (n_saved_regs)
     fprintf (file, "\t#  Register Save Size: %d regs, %d bytes\n",
 	     n_saved_regs, n_saved_regs * 4);
@@ -1792,9 +1796,9 @@ i960_print_operand (file, x, code)
       if (code == 'C')
 	val = ~val;
       if (val > 9999 || val < -999)
-	fprintf (file, "0x%x", val);
+	fprintf (file, HOST_WIDE_INT_PRINT_HEX, val);
       else
-	fprintf (file, "%d", val);
+	fprintf (file, HOST_WIDE_INT_PRINT_DEC, val);
       return;
     }
   else if (rtxcode == CONST_DOUBLE)
@@ -1988,7 +1992,8 @@ i960_print_operand_addr (file, addr)
   if (breg)
     fprintf (file, "(%s)", reg_names[REGNO (breg)]);
   if (ireg)
-    fprintf (file, "[%s*%d]", reg_names[REGNO (ireg)], INTVAL (scale));
+    fprintf (file, "[%s*" HOST_WIDE_INT_PRINT_DEC "]",
+	     reg_names[REGNO (ireg)], INTVAL (scale));
 }
 
 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression


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