This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][committed] Fix bootstrap with --enable-gather-detailed-mem-stats


It's broken because of a warning printing a size_t with %d.  Fixed
by doing what all other places do, print size_t as %ul and cast the
value to unsigned long.

Bootstrapped on x86_64-unknown-linux-gnu, applied as obvious.

Richard.

2006-11-28  Richard Guenther  <rguenther@suse.de>

	* ggc-page.c (ggc_print_statistics): Use %ul and a cast to
	unsigned long for printing OBJECT_SIZE.

Index: ggc-page.c
===================================================================
*** ggc-page.c	(revision 119279)
--- ggc-page.c	(working copy)
*************** ggc_print_statistics (void)
*** 2017,2026 ****
      for (i = 0; i < NUM_ORDERS; i++)
        if (G.stats.total_allocated_per_order[i])
          {
!           fprintf (stderr, "Total Overhead  page size %7d:     %10lld\n",
!                    OBJECT_SIZE (i), G.stats.total_overhead_per_order[i]);
!           fprintf (stderr, "Total Allocated page size %7d:     %10lld\n",
!                    OBJECT_SIZE (i), G.stats.total_allocated_per_order[i]);
          }
    }
  #endif
--- 2017,2028 ----
      for (i = 0; i < NUM_ORDERS; i++)
        if (G.stats.total_allocated_per_order[i])
          {
!           fprintf (stderr, "Total Overhead  page size %7ul:     %10lld\n",
!                    (unsigned long) OBJECT_SIZE (i),
! 		   G.stats.total_overhead_per_order[i]);
!           fprintf (stderr, "Total Allocated page size %7ul:     %10lld\n",
!                    (unsigned long) OBJECT_SIZE (i),
! 		   G.stats.total_allocated_per_order[i]);
          }
    }
  #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]