This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to sparc.h for format specifier warning
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch to sparc.h for format specifier warning
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Fri, 24 Aug 2001 09:00:56 -0400 (EDT)
The following patch fixes this warning:
varasm.c:1884: warning: unsigned int format, different type arg (arg 4)
I assume bytes always fix in an int...
Ok to install?
--Kaveh
2001-08-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* sparc.h (ASM_OUTPUT_BYTE): Fix format specifier warning.
diff -rup orig/egcs-CVS20010822/gcc/config/sparc/sparc.h egcs-CVS20010822/gcc/config/sparc/sparc.h
--- orig/egcs-CVS20010822/gcc/config/sparc/sparc.h Sat Aug 18 16:30:30 2001
+++ egcs-CVS20010822/gcc/config/sparc/sparc.h Fri Aug 24 07:42:17 2001
@@ -3064,7 +3064,7 @@ do { \
/* This is how to output an assembler line for a numeric constant byte. */
#define ASM_OUTPUT_BYTE(FILE,VALUE) \
- fprintf (FILE, "%s0x%x\n", ASM_BYTE_OP, (VALUE))
+ fprintf (FILE, "%s0x%x\n", ASM_BYTE_OP, (int)(VALUE))
/* This is how we hook in and defer the case-vector until the end of
the function. */