Hi,

it's not c++98 conforming and I get 1 million warnings when compiling.  
Initially I had also casts to long at the various arguments, but I get no 
warning with this variant either, so I removed them again.  I'm currently 
regstrapping this, okay for trunk if successfull?


Ciao,
Michael.

        * alloc-pool.h (pool_usage::dump): Don't use %z but %l.
        (pool_usage::dump_footer): Likewise.
        * bitmap.h (bitmap_usage::dump): Likewise.
        * ggc-common.c (ggc_usage::dump): Likewise.
        * ggc-page.c (ggc_print_statistics): Likewise.
        * mem-stats.h (mem_usage::dump): Likewise.
        (mem_usage::dump_footer): Likewise.
        * rtl.c (dump_rtx_statistics): Likewise.
        * vec.c (vec_usage::dump): Likewise.
        (vec_usage::dump_footer): Likewise.

diff --git a/gcc/alloc-pool.h b/gcc/alloc-pool.h
index d17a05ca4fb1..8a6747d89cc6 100644
--- a/gcc/alloc-pool.h
+++ b/gcc/alloc-pool.h
@@ -63,8 +63,8 @@ struct pool_usage: public mem_usage
   {
     char *location_string = loc->to_string ();
 
-    fprintf (stderr, "%-32s%-48s %5zu%c%9zu%c:%5.1f%%%9zu"
-            "%c%9zu%c:%5.1f%%%12zu\n",
+    fprintf (stderr, "%-32s%-48s %5lu%c%9lu%c:%5.1f%%%9lu"
+            "%c%9lu%c:%5.1f%%%12lu\n",
             m_pool_name, location_string,
             SIZE_AMOUNT (m_instances),
             SIZE_AMOUNT (m_allocated),
@@ -91,7 +91,7 @@ struct pool_usage: public mem_usage
   dump_footer ()
   {
     print_dash_line ();
-    fprintf (stderr, "%s%82zu%c%10zu%c\n", "Total",
+    fprintf (stderr, "%s%82lu%c%10lu%c\n", "Total",
             SIZE_AMOUNT (m_instances), SIZE_AMOUNT (m_allocated));
     print_dash_line ();
   }
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index 973ea846baf1..7c547aba9a5b 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -239,8 +239,8 @@ struct bitmap_usage: public mem_usage
   {
     char *location_string = loc->to_string ();
 
-    fprintf (stderr, "%-48s %9zu%c:%5.1f%%"
-            "%9zu%c%9zu%c:%5.1f%%"
+    fprintf (stderr, "%-48s %9lu%c:%5.1f%%"
+            "%9lu%c%9lu%c:%5.1f%%"
             "%11" PRIu64 "%c%11" PRIu64 "%c%10s\n",
             location_string, SIZE_AMOUNT (m_allocated),
             get_percent (m_allocated, total.m_allocated),
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index 9fdba23ce4c2..0fe06ccd653d 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -884,12 +884,13 @@ struct ggc_usage: public mem_usage
   {
     size_t balance = get_balance ();
     fprintf (stderr,
-            "%-48s %9zu%c:%5.1f%%%9zu%c:%5.1f%%"
-            "%9zu%c:%5.1f%%%9zu%c:%5.1f%%%9zu%c\n",
+            "%-48s %9lu%c:%5.1f%%%9lu%c:%5.1f%%"
+            "%9lu%c:%5.1f%%%9lu%c:%5.1f%%%9lu%c\n",
             prefix, SIZE_AMOUNT (m_collected),
             get_percent (m_collected, total.m_collected),
             SIZE_AMOUNT (m_freed), get_percent (m_freed, total.m_freed),
-            SIZE_AMOUNT (balance), get_percent (balance, total.get_balance ()),
+            SIZE_AMOUNT (balance),
+            get_percent (balance, total.get_balance ()),
             SIZE_AMOUNT (m_overhead),
             get_percent (m_overhead, total.m_overhead),
             SIZE_AMOUNT (m_times));
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index 00c2864711f0..6ead4a144390 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -2288,14 +2288,14 @@ ggc_print_statistics (void)
          overhead += (sizeof (page_entry) - sizeof (long)
                       + BITMAP_SIZE (OBJECTS_IN_PAGE (p) + 1));
        }
-      fprintf (stderr, "%-8zu %10zu%c %10zu%c %10zu%c\n",
+      fprintf (stderr, "%-8lu %10lu%c %10lu%c %10lu%c\n",
               OBJECT_SIZE (i),
               SIZE_AMOUNT (allocated),
               SIZE_AMOUNT (in_use),
               SIZE_AMOUNT (overhead));
       total_overhead += overhead;
     }
-  fprintf (stderr, "%-8s %10zu%c %10zu%c %10zu%c\n",
+  fprintf (stderr, "%-8s %10lu%c %10lu%c %10lu%c\n",
           "Total",
           SIZE_AMOUNT (G.bytes_mapped),
           SIZE_AMOUNT (G.allocated),
@@ -2335,11 +2335,11 @@ ggc_print_statistics (void)
       for (i = 0; i < NUM_ORDERS; i++)
        if (G.stats.total_allocated_per_order[i])
          {
-           fprintf (stderr, "Total Overhead  page size %9zu:     %9"
+           fprintf (stderr, "Total Overhead  page size %9lu:     %9"
                     HOST_LONG_LONG_FORMAT "d%c\n",
                     OBJECT_SIZE (i),
                     SIZE_AMOUNT (G.stats.total_overhead_per_order[i]));
-           fprintf (stderr, "Total Allocated page size %9zu:     %9"
+           fprintf (stderr, "Total Allocated page size %9lu:     %9"
                     HOST_LONG_LONG_FORMAT "d%c\n",
                     OBJECT_SIZE (i),
                     SIZE_AMOUNT (G.stats.total_allocated_per_order[i]));
diff --git a/gcc/mem-stats.h b/gcc/mem-stats.h
index 6ab92211cf47..a2da009f100e 100644
--- a/gcc/mem-stats.h
+++ b/gcc/mem-stats.h
@@ -205,8 +205,8 @@ struct mem_usage
   {
     char *location_string = loc->to_string ();
 
-    fprintf (stderr, "%-48s %9zu%c:%5.1f%%"
-            "%9zu%c%9zu%c:%5.1f%%%10s\n",
+    fprintf (stderr, "%-48s %9lu%c:%5.1f%%"
+            "%9lu%c%9lu%c:%5.1f%%%10s\n",
             location_string, SIZE_AMOUNT (m_allocated),
             get_percent (m_allocated, total.m_allocated),
             SIZE_AMOUNT (m_peak), SIZE_AMOUNT (m_times),
@@ -220,7 +220,7 @@ struct mem_usage
   dump_footer () const
   {
     print_dash_line ();
-    fprintf (stderr, "%s%53zu%c%26zu%c\n", "Total",
+    fprintf (stderr, "%s%53lu%c%26lu%c\n", "Total",
             SIZE_AMOUNT (m_allocated), SIZE_AMOUNT (m_times));
     print_dash_line ();
   }
diff --git a/gcc/rtl.c b/gcc/rtl.c
index bf897bf75b4e..c253810832e3 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -821,7 +821,7 @@ dump_rtx_statistics (void)
       unsigned j = indices[i];
       if (rtx_alloc_counts[j])
        {
-         fprintf (stderr, "%-24s %6zu%c %9zu%c\n",
+         fprintf (stderr, "%-24s %6lu%c %9lu%c\n",
                   GET_RTX_NAME (j),
                   SIZE_AMOUNT (rtx_alloc_counts[j]),
                   SIZE_AMOUNT (rtx_alloc_sizes[j]));
@@ -832,7 +832,7 @@ dump_rtx_statistics (void)
 
   if (rtvec_alloc_counts)
     {
-      fprintf (stderr, "%-24s %6zu%c %9zu%c\n", "rtvec",
+      fprintf (stderr, "%-24s %6lu%c %9lu%c\n", "rtvec",
               SIZE_AMOUNT (rtvec_alloc_counts),
               SIZE_AMOUNT (rtvec_alloc_sizes));
       total_counts += rtvec_alloc_counts;
diff --git a/gcc/vec.c b/gcc/vec.c
index bd49d0358c5c..2a76ae03337e 100644
--- a/gcc/vec.c
+++ b/gcc/vec.c
@@ -83,8 +83,8 @@ struct vec_usage: public mem_usage
     s[48] = '\0';
 
     fprintf (stderr,
-            "%-48s %10zu%10zu%c:%4.1f%%%9zu%c%10zu"
-            ":%4.1f%%%10zu%c%10zu%c\n",
+            "%-48s %10lu%10lu%c:%4.1f%%%9lu%c%10lu"
+            ":%4.1f%%%10lu%c%10lu%c\n",
             s,
             m_element_size,
             SIZE_AMOUNT (m_allocated),
@@ -99,7 +99,7 @@ struct vec_usage: public mem_usage
   dump_footer ()
   {
     print_dash_line ();
-    fprintf (stderr, "%s%64zu%c%25zu%c%16zu%c\n",
+    fprintf (stderr, "%s%64lu%c%25lu%c%16lu%c\n",
             "Total", SIZE_AMOUNT (m_allocated),
             SIZE_AMOUNT (m_times), SIZE_AMOUNT (m_items));
     print_dash_line ();

Reply via email to