From 683eb0e99a52c56e400f690a62236cf66ab4d981 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 23 Jul 2000 10:25:06 -0600 Subject: [PATCH] bitmap.c (debug_bitmap_file): Cast pointers to PTR for printing with %p. * bitmap.c (debug_bitmap_file): Cast pointers to PTR for printing with %p. * ggc-page.c (debug_print_page_list, alloc_page, free_page, ggc_alloc): Likewise. * bb-reorder.c (dump_scope_forest_1): Likewise. From-SVN: r35201 --- gcc/ChangeLog | 8 ++++++++ gcc/bb-reorder.c | 2 +- gcc/bitmap.c | 10 +++++----- gcc/ggc-page.c | 14 ++++++++------ 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 097002364f0..4aeca1eed90 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2000-07-23 Joseph S. Myers + + * bitmap.c (debug_bitmap_file): Cast pointers to PTR for printing + with %p. + * ggc-page.c (debug_print_page_list, alloc_page, free_page, + ggc_alloc): Likewise. + * bb-reorder.c (dump_scope_forest_1): Likewise. + 2000-07-22 Aldy Hernandez * reload.c (find_reloads_toplev): Add new parameter diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 13943a8e3ee..f3b72b80695 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -1318,7 +1318,7 @@ dump_scope_forest_1 (s, indent) fprintf (stderr, "%*s", indent, ""); fprintf (stderr, "{ level %d (block %p)\n", s->level, - NOTE_BLOCK (s->note_beg)); + (PTR) NOTE_BLOCK (s->note_beg)); fprintf (stderr, "%*s%s", indent, "", "bbs:"); for (i = 0; i < s->num_bbs; i++) diff --git a/gcc/bitmap.c b/gcc/bitmap.c index d1588d8b7eb..5daba06a533 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -596,9 +596,9 @@ debug_bitmap_file (file, head) bitmap_element *ptr; fprintf (file, "\nfirst = "); - fprintf (file, HOST_PTR_PRINTF, head->first); + fprintf (file, HOST_PTR_PRINTF, (PTR) head->first); fprintf (file, " current = "); - fprintf (file, HOST_PTR_PRINTF, head->current); + fprintf (file, HOST_PTR_PRINTF, (PTR) head->current); fprintf (file, " indx = %u\n", head->indx); for (ptr = head->first; ptr; ptr = ptr->next) @@ -606,11 +606,11 @@ debug_bitmap_file (file, head) int i, j, col = 26; fprintf (file, "\t"); - fprintf (file, HOST_PTR_PRINTF, ptr); + fprintf (file, HOST_PTR_PRINTF, (PTR) ptr); fprintf (file, " next = "); - fprintf (file, HOST_PTR_PRINTF, ptr->next); + fprintf (file, HOST_PTR_PRINTF, (PTR) ptr->next); fprintf (file, " prev = "); - fprintf (file, HOST_PTR_PRINTF, ptr->prev); + fprintf (file, HOST_PTR_PRINTF, (PTR) ptr->prev); fprintf (file, " indx = %u\n\t\tbits = {", ptr->indx); for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 2a7e1014fd2..c939cf64a9c 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -386,11 +386,13 @@ debug_print_page_list (order) int order; { page_entry *p; - printf ("Head=%p, Tail=%p:\n", G.pages[order], G.page_tails[order]); + printf ("Head=%p, Tail=%p:\n", (PTR) G.pages[order], + (PTR) G.page_tails[order]); p = G.pages[order]; while (p != NULL) { - printf ("%p(%1d|%3d) -> ", p, p->context_depth, p->num_free_objects); + printf ("%p(%1d|%3d) -> ", (PTR) p, p->context_depth, + p->num_free_objects); p = p->next; } printf ("NULL\n"); @@ -504,8 +506,8 @@ alloc_page (order) if (GGC_DEBUG_LEVEL >= 2) fprintf (G.debug_file, - "Allocating page at %p, object size=%d, data %p-%p\n", entry, - 1 << order, page, page + entry_size - 1); + "Allocating page at %p, object size=%d, data %p-%p\n", + (PTR) entry, 1 << order, page, page + entry_size - 1); return entry; } @@ -518,7 +520,7 @@ free_page (entry) { if (GGC_DEBUG_LEVEL >= 2) fprintf (G.debug_file, - "Deallocating page at %p, data %p-%p\n", entry, + "Deallocating page at %p, data %p-%p\n", (PTR) entry, entry->page, entry->page + entry->bytes - 1); set_page_table_entry (entry->page, NULL); @@ -714,7 +716,7 @@ ggc_alloc (size) if (GGC_DEBUG_LEVEL >= 3) fprintf (G.debug_file, "Allocating object, requested size=%d, actual=%d at %p on %p\n", - (int) size, 1 << order, result, entry); + (int) size, 1 << order, result, (PTR) entry); return result; } -- 2.30.2