diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-09-07 16:52:26 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-09-07 12:52:26 -0400 |
commit | 7b9e1fcf2d1bf421389b08bbf99bb477da478592 (patch) | |
tree | 8158dd39b5792996fd718b6f01d2f403a4c9031d /gcc | |
parent | 08dc0e10f4c6528bdb8207230edbbc5e8e2fce2f (diff) | |
download | gcc-7b9e1fcf2d1bf421389b08bbf99bb477da478592.zip gcc-7b9e1fcf2d1bf421389b08bbf99bb477da478592.tar.gz gcc-7b9e1fcf2d1bf421389b08bbf99bb477da478592.tar.bz2 |
genattrtab.c (attr_printf): First arg is unsigned.
* genattrtab.c (attr_printf): First arg is unsigned.
Clean up formatting of callers.
From-SVN: r45469
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/genattrtab.c | 30 |
2 files changed, 21 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3dffbb6..26367f4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Fri Sep 7 12:56:26 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * genattrtab.c (attr_printf): First arg is unsigned. + Clean up formatting of callers. + 2001-09-06 Aldy Hernandez <aldyh@redhat.com> * config/mips/mips.c (override_options): Allow abi32 with 64 bit diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 5664110..3006ec8 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -365,7 +365,7 @@ rtx pic_offset_table_rtx; static void attr_hash_add_rtx PARAMS ((int, rtx)); static void attr_hash_add_string PARAMS ((int, char *)); static rtx attr_rtx PARAMS ((enum rtx_code, ...)); -static char *attr_printf PARAMS ((int, const char *, ...)) +static char *attr_printf PARAMS ((unsigned int, const char *, ...)) ATTRIBUTE_PRINTF_2; static char *attr_string PARAMS ((const char *, int)); static rtx check_attr_test PARAMS ((rtx, int, int)); @@ -743,15 +743,15 @@ attr_rtx VPARAMS ((enum rtx_code code, ...)) rtx attr_printf (len, format, [arg1, ..., argn]) */ static char * -attr_printf VPARAMS ((register int len, const char *fmt, ...)) +attr_printf VPARAMS ((register unsigned int len, const char *fmt, ...)) { char str[256]; VA_OPEN (p, fmt); - VA_FIXEDARG (p, int, len); + VA_FIXEDARG (p, unsigned int, len); VA_FIXEDARG (p, const char *, fmt); - if (len > (sizeof(str) - 1)) /* leave room for \0 */ + if (len > sizeof str - 1) /* leave room for \0. */ abort (); vsprintf (str, fmt, p); @@ -1637,9 +1637,8 @@ expand_delays () newexp = attr_rtx (IF_THEN_ELSE, condexp, make_numeric_value (1), make_numeric_value (0)); - p = attr_printf (sizeof ("*delay__") + MAX_DIGITS * 2, - "*delay_%d_%d", - delay->num, i / 3); + p = attr_printf (sizeof "*delay__" + MAX_DIGITS * 2, + "*delay_%d_%d", delay->num, i / 3); make_internal_attr (p, newexp, 1); if (have_annul_true) @@ -1649,7 +1648,7 @@ expand_delays () newexp = attr_rtx (IF_THEN_ELSE, condexp, make_numeric_value (1), make_numeric_value (0)); - p = attr_printf (sizeof ("*annul_true__") + MAX_DIGITS * 2, + p = attr_printf (sizeof "*annul_true__" + MAX_DIGITS * 2, "*annul_true_%d_%d", delay->num, i / 3); make_internal_attr (p, newexp, 1); } @@ -1661,7 +1660,7 @@ expand_delays () newexp = attr_rtx (IF_THEN_ELSE, condexp, make_numeric_value (1), make_numeric_value (0)); - p = attr_printf (sizeof ("*annul_false__") + MAX_DIGITS * 2, + p = attr_printf (sizeof "*annul_false__" + MAX_DIGITS * 2, "*annul_false_%d_%d", delay->num, i / 3); make_internal_attr (p, newexp, 1); } @@ -1914,7 +1913,8 @@ expand_units () != unit->issue_delay.max); if (unit->needs_conflict_function) { - str = attr_printf (strlen (unit->name) + sizeof ("*_cost_") + MAX_DIGITS, + str = attr_printf ((strlen (unit->name) + sizeof "*_cost_" + + MAX_DIGITS), "*%s_cost_%d", unit->name, op->num); make_internal_attr (str, issue_exp, 1); } @@ -2143,7 +2143,8 @@ expand_units () } /* Make an attribute for use in the blockage function. */ - str = attr_printf (strlen (unit->name) + sizeof ("*_block_") + MAX_DIGITS, + str = attr_printf ((strlen (unit->name) + sizeof "*_block_" + + MAX_DIGITS), "*%s_block_%d", unit->name, op->num); make_internal_attr (str, blockage, 1); } @@ -2176,12 +2177,13 @@ expand_units () newexp = operate_exp (RANGE_OP, min_blockage, max_blockage); newexp = simplify_knowing (newexp, unit->condexp); - str = attr_printf (strlen (unit->name) + sizeof ("*_unit_blockage_range"), + str = attr_printf ((strlen (unit->name) + + sizeof "*_unit_blockage_range"), "*%s_unit_blockage_range", unit->name); make_internal_attr (str, newexp, 20); } - str = attr_printf (strlen (unit->name) + sizeof ("*_unit_ready_cost"), + str = attr_printf (strlen (unit->name) + sizeof "*_unit_ready_cost", "*%s_unit_ready_cost", unit->name); } else @@ -2223,7 +2225,7 @@ expand_units () } /* Simplifying caseexp with simplify_by_exploding doesn't win. */ - str = attr_printf (strlen (unit->name) + sizeof ("*_cases"), + str = attr_printf (strlen (unit->name) + sizeof "*_cases", "*%s_cases", unit->name); make_internal_attr (str, caseexp, 1); } |