From de064be970f5146ba9366d41733609a4fb2b11c6 Mon Sep 17 00:00:00 2001 From: geoffk Date: Fri, 18 May 2007 23:05:50 +0000 Subject: [PATCH] Index: gcc/java/ChangeLog 2007-05-18 Geoffrey Keating * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx. (print_constant): Likewise. Index: gcc/ChangeLog 2007-05-18 Geoffrey Keating * dwarf2out.c (print_die): Use '%ld' not '%lu' to print a 'long'. (output_die): Use 'unsigned long' with %x. * sched-vis.c (print_value): Use 'unsigned HOST_WIDE_INT' and HOST_WIDE_INT_PRINT_HEX to print HOST_WIDE_INT. * tree-dump.c (dump_pointer): Use 'unsigned long' for %lx. Index: gcc/cp/ChangeLog 2007-05-18 Geoffrey Keating * mangle.c (write_real_cst): Use 'unsigned long' for %lx. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124839 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/cp/ChangeLog | 4 ++++ gcc/cp/mangle.c | 2 +- gcc/dwarf2out.c | 11 ++++++----- gcc/java/ChangeLog | 5 +++++ gcc/java/jcf-dump.c | 7 ++++--- gcc/sched-vis.c | 5 ++++- gcc/tree-dump.c | 2 +- 8 files changed, 31 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4fda2e6eb6e..d558fac20db 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2007-05-18 Geoffrey Keating + * dwarf2out.c (print_die): Use '%ld' not '%lu' to print a 'long'. + (output_die): Use 'unsigned long' with %x. + * sched-vis.c (print_value): Use 'unsigned HOST_WIDE_INT' and + HOST_WIDE_INT_PRINT_HEX to print HOST_WIDE_INT. + * tree-dump.c (dump_pointer): Use 'unsigned long' for %lx. + * unwind-dw2.c (uw_identify_context): Use the CFA, not the IP. 2007-05-18 H.J. Lu diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index eb9656f4898..125d56d6d8e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2007-05-18 Geoffrey Keating + + * mangle.c (write_real_cst): Use 'unsigned long' for %lx. + 2007-05-14 Paolo Carlini PR c++/29928 diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 31676e7b454..df5b7d8bab4 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -1340,7 +1340,7 @@ write_real_cst (const tree value) for (; i != limit; i += dir) { - sprintf (buffer, "%08lx", target_real[i]); + sprintf (buffer, "%08lx", (unsigned long) target_real[i]); write_chars (buffer, 8); } } diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 8c9d028d2f6..ae540215ec4 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -5768,11 +5768,11 @@ print_die (dw_die_ref die, FILE *outfile) unsigned ix; print_spaces (outfile); - fprintf (outfile, "DIE %4lu: %s\n", + fprintf (outfile, "DIE %4ld: %s\n", die->die_offset, dwarf_tag_name (die->die_tag)); print_spaces (outfile); fprintf (outfile, " abbrev id: %lu", die->die_abbrev); - fprintf (outfile, " offset: %lu\n", die->die_offset); + fprintf (outfile, " offset: %ld\n", die->die_offset); for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++) { @@ -5820,7 +5820,7 @@ print_die (dw_die_ref die, FILE *outfile) if (AT_ref (a)->die_symbol) fprintf (outfile, "die -> label: %s", AT_ref (a)->die_symbol); else - fprintf (outfile, "die -> %lu", AT_ref (a)->die_offset); + fprintf (outfile, "die -> %ld", AT_ref (a)->die_offset); } else fprintf (outfile, "die -> "); @@ -7091,7 +7091,8 @@ output_die (dw_die_ref die) output_die_symbol (die); dw2_asm_output_data_uleb128 (die->die_abbrev, "(DIE (0x%lx) %s)", - die->die_offset, dwarf_tag_name (die->die_tag)); + (unsigned long)die->die_offset, + dwarf_tag_name (die->die_tag)); for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++) { @@ -7273,7 +7274,7 @@ output_die (dw_die_ref die) /* Add null byte to terminate sibling list. */ if (die->die_child != NULL) dw2_asm_output_data (1, 0, "end of children of DIE 0x%lx", - die->die_offset); + (unsigned long) die->die_offset); } /* Output the compilation unit that appears at the beginning of the diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index dceb9690a8f..7bfa288ec5f 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2007-05-18 Geoffrey Keating + + * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx. + (print_constant): Likewise. + 2007-05-14 Rafael Avila de Espindola * expr.c (build_java_binop): Use unsigned_type_for instead of diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c index 0dfa4c20792..5397bc353b1 100644 --- a/gcc/java/jcf-dump.c +++ b/gcc/java/jcf-dump.c @@ -138,7 +138,7 @@ utf8_equal_string (JCF *jcf, int index, const char * value) if (flag_print_class_info) \ fprintf (out, \ "Magic number: 0x%0lx, minor_version: %ld, major_version: %ld.\n",\ - (long) MAGIC, (long) MINOR, (long) MAJOR) + (unsigned long) MAGIC, (long) MINOR, (long) MAJOR) #define HANDLE_START_CONSTANT_POOL(COUNT) \ if (flag_print_constant_pool) \ @@ -811,7 +811,7 @@ print_constant (FILE *out, JCF *jcf, int index, int verbosity) } if (verbosity > 1) - fprintf (out, ", bits = 0x%08lx", (long) JPOOL_UINT (jcf, index)); + fprintf (out, ", bits = 0x%08lx", (unsigned long) JPOOL_UINT (jcf, index)); break; } @@ -860,7 +860,8 @@ print_constant (FILE *out, JCF *jcf, int index, int verbosity) int32 hi, lo; hi = JPOOL_UINT (jcf, index); lo = JPOOL_UINT (jcf, index + 1); - fprintf (out, ", bits = 0x%08lx%08lx", (long) hi, (long) lo); + fprintf (out, ", bits = 0x%08lx%08lx", (unsigned long) hi, + (unsigned long) lo); } break; } diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c index 20129559470..fec0bb70824 100644 --- a/gcc/sched-vis.c +++ b/gcc/sched-vis.c @@ -430,7 +430,10 @@ print_value (char *buf, rtx x, int verbose) if (FLOAT_MODE_P (GET_MODE (x))) real_to_decimal (t, CONST_DOUBLE_REAL_VALUE (x), sizeof (t), 0, 1); else - sprintf (t, "<0x%lx,0x%lx>", (long) CONST_DOUBLE_LOW (x), (long) CONST_DOUBLE_HIGH (x)); + sprintf (t, + "<" HOST_WIDE_INT_PRINT_HEX "," HOST_WIDE_INT_PRINT_HEX ">", + (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x), + (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x)); cur = safe_concat (buf, cur, t); break; case CONST_STRING: diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c index 16f71df2028..d8f871e47db 100644 --- a/gcc/tree-dump.c +++ b/gcc/tree-dump.c @@ -166,7 +166,7 @@ void dump_pointer (dump_info_p di, const char *field, void *ptr) { dump_maybe_newline (di); - fprintf (di->stream, "%-4s: %-8lx ", field, (long) ptr); + fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr); di->column += 15; } -- 2.11.0