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 arc warnings


Fixes format specifiers and some signed/unsigned warnings.
Tested by building cc1 targetted to arc-unknown-elf.

We still get warnings in toplev.c because of missing initializers in
TARGET_SWITCHES and TARGET_OPTIONS, but this is still an improvement.

Installed as obvious.



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

	* arc.c (arc_output_function_prologue,
	arc_output_function_epilogue): Fix format specifier warnings.
	* arc.h (LARGE_INT): Fix signed/unsigned warnings.	

diff -rup orig/egcc-CVS20030516/gcc/config/arc/arc.c egcc-CVS20030516/gcc/config/arc/arc.c
--- orig/egcc-CVS20030516/gcc/config/arc/arc.c	2003-05-09 20:01:31.000000000 -0400
+++ egcc-CVS20030516/gcc/config/arc/arc.c	2003-05-16 15:20:25.883346809 -0400
@@ -1263,7 +1263,7 @@ arc_output_function_prologue (file, size
 
   /* Allocate the stack frame.  */
   if (size - current_frame_info.pretend_size > 0)
-    fprintf (file, "\tsub %s,%s,%d\n",
+    fprintf (file, "\tsub %s,%s," HOST_WIDE_INT_PRINT_DEC "\n",
 	     sp_str, sp_str, size - current_frame_info.pretend_size);
 
   /* Save any needed call-saved regs (and call-used if this is an
@@ -1425,7 +1425,7 @@ arc_output_function_epilogue (file, size
 	{
 	  if (!SMALL_INT (size - restored))
 	    abort ();
-	  fprintf (file, "\tadd %s,%s,%d\n",
+	  fprintf (file, "\tadd %s,%s," HOST_WIDE_INT_PRINT_DEC "\n",
 		   sp_str, sp_str, size - restored);
 	}
       else
diff -rup orig/egcc-CVS20030516/gcc/config/arc/arc.h egcc-CVS20030516/gcc/config/arc/arc.h
--- orig/egcc-CVS20030516/gcc/config/arc/arc.h	2003-04-17 21:09:29.000000000 -0400
+++ egcc-CVS20030516/gcc/config/arc/arc.h	2003-05-16 15:20:25.893347066 -0400
@@ -493,7 +493,7 @@ extern enum reg_class arc_regno_reg_clas
 /* local to this file */
 #define LARGE_INT(X) \
 ((X) >= (-(HOST_WIDE_INT) 0x7fffffff - 1) \
- && (X) <= (unsigned HOST_WIDE_INT) 0xffffffff)
+ && (unsigned HOST_WIDE_INT)(X) <= (unsigned HOST_WIDE_INT) 0xffffffff)
 
 #define CONST_OK_FOR_LETTER_P(VALUE, C) \
 ((C) == 'I' ? SMALL_INT (VALUE)		\


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