From 13a8b496ce8381051e5cc7089034cdd909d5afb0 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Fri, 16 May 2003 20:49:42 +0000 Subject: 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 --- gcc/ChangeLog | 3 +++ gcc/config/c4x/c4x.c | 24 ++++++++++++------------ 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 + * 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. */ } -- cgit v1.1