aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2003-05-16 20:49:42 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2003-05-16 20:49:42 +0000
commit13a8b496ce8381051e5cc7089034cdd909d5afb0 (patch)
treef9eb3ce37f07c99dbfb5344abffa1317d67c4568
parentdcac003d6685744f5f95c068b85b051a03567272 (diff)
downloadgcc-13a8b496ce8381051e5cc7089034cdd909d5afb0.zip
gcc-13a8b496ce8381051e5cc7089034cdd909d5afb0.tar.gz
gcc-13a8b496ce8381051e5cc7089034cdd909d5afb0.tar.bz2
c4x.c (c4x_print_operand, [...]): Fix format specifier warnings.
* c4x.c (c4x_print_operand, c4x_print_operand_address): Fix format specifier warnings. From-SVN: r66880
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/config/c4x/c4x.c24
2 files changed, 15 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 67ac0fd..ea25e51 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ * c4x.c (c4x_print_operand, c4x_print_operand_address): Fix format
+ specifier warnings.
+
* alpha.c (print_operand_address, alpha_start_function,
unicosmk_output_ssib): Use string concatentation on
HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index e58850f..19b9047 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -1884,7 +1884,7 @@ c4x_print_operand (file, op, letter)
case 'N': /* Ones complement of small constant. */
if (code != CONST_INT)
fatal_insn ("c4x_print_operand: %%N inconsistency", op);
- fprintf (file, "%d", ~INTVAL (op));
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, ~INTVAL (op));
return;
case 'K': /* Generate ldp(k) if direct address. */
@@ -1964,7 +1964,7 @@ c4x_print_operand (file, op, letter)
break;
case CONST_INT:
- fprintf (file, "%d", INTVAL (op));
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (op));
break;
case NE:
@@ -2053,11 +2053,11 @@ c4x_print_operand_address (file, addr)
fprintf (file, "*%s++(%s)", reg_names[REGNO (op0)],
reg_names[REGNO (op1)]);
else if (GET_CODE (XEXP (addr, 1)) == PLUS && INTVAL (op1) > 0)
- fprintf (file, "*%s++(%d)", reg_names[REGNO (op0)],
- INTVAL (op1));
+ fprintf (file, "*%s++(" HOST_WIDE_INT_PRINT_DEC ")",
+ reg_names[REGNO (op0)], INTVAL (op1));
else if (GET_CODE (XEXP (addr, 1)) == PLUS && INTVAL (op1) < 0)
- fprintf (file, "*%s--(%d)", reg_names[REGNO (op0)],
- -INTVAL (op1));
+ fprintf (file, "*%s--(" HOST_WIDE_INT_PRINT_DEC ")",
+ reg_names[REGNO (op0)], -INTVAL (op1));
else if (GET_CODE (XEXP (addr, 1)) == MINUS && REG_P (op1))
fprintf (file, "*%s--(%s)", reg_names[REGNO (op0)],
reg_names[REGNO (op1)]);
@@ -2075,11 +2075,11 @@ c4x_print_operand_address (file, addr)
fprintf (file, "*++%s(%s)", reg_names[REGNO (op0)],
reg_names[REGNO (op1)]);
else if (GET_CODE (XEXP (addr, 1)) == PLUS && INTVAL (op1) > 0)
- fprintf (file, "*++%s(%d)", reg_names[REGNO (op0)],
- INTVAL (op1));
+ fprintf (file, "*++%s(" HOST_WIDE_INT_PRINT_DEC ")",
+ reg_names[REGNO (op0)], INTVAL (op1));
else if (GET_CODE (XEXP (addr, 1)) == PLUS && INTVAL (op1) < 0)
- fprintf (file, "*--%s(%d)", reg_names[REGNO (op0)],
- -INTVAL (op1));
+ fprintf (file, "*--%s(" HOST_WIDE_INT_PRINT_DEC ")",
+ reg_names[REGNO (op0)], -INTVAL (op1));
else if (GET_CODE (XEXP (addr, 1)) == MINUS && REG_P (op1))
fprintf (file, "*--%s(%s)", reg_names[REGNO (op0)],
reg_names[REGNO (op1)]);
@@ -2120,13 +2120,13 @@ c4x_print_operand_address (file, addr)
}
else if (INTVAL (op1) < 0)
{
- fprintf (file, "*-%s(%d)",
+ fprintf (file, "*-%s(" HOST_WIDE_INT_PRINT_DEC ")",
reg_names[REGNO (op0)],
-INTVAL (op1)); /* Base - displacement. */
}
else
{
- fprintf (file, "*+%s(%d)",
+ fprintf (file, "*+%s(" HOST_WIDE_INT_PRINT_DEC ")",
reg_names[REGNO (op0)],
INTVAL (op1)); /* Base + displacement. */
}