summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-16 22:05:08 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-16 22:05:08 +0000
commit9e46e77e7dafd4a35f9f6139693f80e26515258c (patch)
treebe335a4e748016b364510cf7cb972d260049ba08
parenta6cdc5f0f81a9b696823a3967c2450b5db7a4fc9 (diff)
downloadgcc-9e46e77e7dafd4a35f9f6139693f80e26515258c.tar.gz
* ip2k.c (function_prologue, function_epilogue, print_operand):
Fix format specifier warnings. * ip2k.md: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66886 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/ip2k/ip2k.c16
-rw-r--r--gcc/config/ip2k/ip2k.md2
3 files changed, 14 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index df50281a6fc..93c8bc1846b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ * ip2k.c (function_prologue, function_epilogue, print_operand):
+ Fix format specifier warnings.
+ * ip2k.md: Likewise.
+
* i960.c (i960_output_function_prologue, i960_print_operand,
i960_print_operand_addr): Fix format specifier warnings.
diff --git a/gcc/config/ip2k/ip2k.c b/gcc/config/ip2k/ip2k.c
index 581479869e8..c8c17ccc3d0 100644
--- a/gcc/config/ip2k/ip2k.c
+++ b/gcc/config/ip2k/ip2k.c
@@ -218,7 +218,8 @@ function_prologue (file, size)
take any action based on the information. */
prologue_size = 0;
- fprintf (file, "/* prologue: frame size=%d */\n", size);
+ fprintf (file, "/* prologue: frame size=" HOST_WIDE_INT_PRINT_DEC " */\n",
+ size);
/* Unless we're a leaf we need to save the return PC. */
@@ -344,7 +345,8 @@ function_epilogue (file, size)
leaf_func_p = leaf_function_p ();
epilogue_size = 0;
- fprintf (file, "/* epilogue: frame size=%d */\n", size);
+ fprintf (file, "/* epilogue: frame size=" HOST_WIDE_INT_PRINT_DEC " */\n",
+ size);
savelimit = (CHAIN_FRAMES) ? REG_FP : (REG_FP + 2);
for (reg = 0; reg < savelimit; reg++)
@@ -919,11 +921,11 @@ print_operand (file, x, code)
switch (code)
{
case 'x':
- fprintf (file, "$%x", INTVAL (x) & 0xffff);
+ fprintf (file, "$%x", (int)(INTVAL (x) & 0xffff));
break;
case 'b':
- fprintf (file, "%d", INTVAL (x)); /* bit selector */
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); /* bit selector */
break;
case 'e': /* "1 << n" - e.g. "exp" */
@@ -942,11 +944,11 @@ print_operand (file, x, code)
break;
case 'H':
- fprintf (file, "#%d", (INTVAL (x) >> 8) & 0xff);
+ fprintf (file, "#%d", (int)((INTVAL (x) >> 8) & 0xff));
break;
case 'L':
- fprintf (file, "#%d", INTVAL (x) & 0xff);
+ fprintf (file, "#%d", (int)(INTVAL (x) & 0xff));
break;
case 'S':
@@ -962,7 +964,7 @@ print_operand (file, x, code)
break;
default:
- fprintf (file, "#%d", INTVAL (x));
+ fprintf (file, "#" HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
}
break;
diff --git a/gcc/config/ip2k/ip2k.md b/gcc/config/ip2k/ip2k.md
index f29d05acb30..b4f257980aa 100644
--- a/gcc/config/ip2k/ip2k.md
+++ b/gcc/config/ip2k/ip2k.md
@@ -977,7 +977,7 @@
/* Constant can just be or-ed in. */
{
p += sprintf (p, \"mov\\tw,#$%2.2x\;or\\t%%0,w\",
- (INTVAL (operands[3]) << pos) & mask & 0xff);
+ (int) (INTVAL (operands[3]) << pos) & mask & 0xff);
return buff;
}