Author: Kaveh R. GHAZI Date: To: Diego Novillo CC: gcc, gcc-patches Subject: Re: Bootstrap failures due to C++ warnings with --enable-gather-detailed-memory-stats
On Thu, 3 Jul 2008, Diego Novillo wrote:
> > Can you suggest a few things to try? E.g. I did --with-gc=zone and a
> > couple of errors cropped up. If there are other configurations that come
> > to mind, let me know.
>
> I had these in mind:
>
> --disable-checking
> --enable-checking=all,valgrind (you got time to go on holiday with this one)
> --enable-coverage
> Diego.
I tried --disable-checking and --enable-coverage, no problems bootstrap
completed. Using --with-gc=zone had some warnings which are fixed below.
I'll try extra --enable-checking options overnight.
Meantime, patch below bootstrapped with --with-gc=zone on
x86_64-unknown-linux-gnu. Okay for mainline?
diff -rup orig/egcc-SVN20080703/gcc/ggc-zone.c egcc-SVN20080703/gcc/ggc-zone.c
--- orig/egcc-SVN20080703/gcc/ggc-zone.c 2008-06-07 02:00:13.000000000 +0200
+++ egcc-SVN20080703/gcc/ggc-zone.c 2008-07-04 01:32:40.000000000 +0200
@@ -541,7 +541,7 @@ lookup_page_table_if_allocated (const vo
return NULL;
/* We might have a page entry which does not correspond exactly to a
system page. */
- if (base[L1][L2] && (char *) p < base[L1][L2]->page)
+ if (base[L1][L2] && (const char *) p < base[L1][L2]->page)
return NULL;
/* Add the chunk to the free list. We don't bother with coalescing,
since we are likely to want a chunk of this size again. */
- free_chunk (p, size, page->zone);
+ free_chunk ((char *)p, size, page->zone);
}
}
/* Allocate a place for object X of size SIZE in the PCH file. */
@@ -2516,7 +2516,7 @@ ggc_pch_read (FILE *f, void *addr)
/* Allocate the dummy page entry for the PCH, and set all pages
mapped into the PCH to reference it. */
- pch_page = xcalloc (1, sizeof (struct page_entry));
+ pch_page = XCNEW (struct page_entry);
pch_page->page = pch_zone.page;
pch_page->pch_p = true;