Index: gcc/java/ChangeLog
authorGeoffrey Keating <geoffk@apple.com>
Fri, 18 May 2007 23:05:50 +0000 (23:05 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Fri, 18 May 2007 23:05:50 +0000 (23:05 +0000)
2007-05-18  Geoffrey Keating  <geoffk@apple.com>

* jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
(print_constant): Likewise.

Index: gcc/ChangeLog
2007-05-18  Geoffrey Keating  <geoffk@apple.com>

* 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  <geoffk@apple.com>

* mangle.c (write_real_cst): Use 'unsigned long' for %lx.

From-SVN: r124839

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/mangle.c
gcc/dwarf2out.c
gcc/java/ChangeLog
gcc/java/jcf-dump.c
gcc/sched-vis.c
gcc/tree-dump.c

index 4fda2e6eb6e19e367a66422321e3a08aae47331d..d558fac20db4418ef5bc2982fc3e6d55decb81ee 100644 (file)
@@ -1,5 +1,11 @@
 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
 
+       * 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  <hongjiu.lu@intel.com>
index eb9656f48982694e1459e19aa51028443054b4c8..125d56d6d8e720e6cd48495a8b46d068f9681e12 100644 (file)
@@ -1,3 +1,7 @@
+2007-05-18  Geoffrey Keating  <geoffk@apple.com>
+
+       * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
+
 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/29928
index 31676e7b454055413e0654114465d05816aba3af..df5b7d8bab4e8ea6c8af3fa5d7e20da99718aafc 100644 (file)
@@ -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);
        }
     }
index 8c9d028d2f64681880a81e094bd2458675fa1c55..ae540215ec4d0182dbc610b0675a1ab65a6d3573 100644 (file)
@@ -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 -> <null>");
@@ -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
index dceb9690a8f8eeaef090368b3da91ceba6382dcd..7bfa288ec5f6982b3ac85a301712bd0283a17920 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-18  Geoffrey Keating  <geoffk@apple.com>
+
+       * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
+       (print_constant): Likewise.
+
 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
 
        * expr.c (build_java_binop): Use unsigned_type_for instead of
index 0dfa4c20792d5a8e33ae26499431f4d58d132740..5397bc353b141340ea2d0a5d59a46ba9a390ccf2 100644 (file)
@@ -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;
       }
index 20129559470e03004a6c1e3ce3f8170af0034077..fec0bb7082420294c047f82a148ce9da979fb4e1 100644 (file)
@@ -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:
index 16f71df20287d8986060f340f079f5f53cad7823..d8f871e47db293414c533758433fb48b95b3c1a3 100644 (file)
@@ -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;
 }