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]

Re: (new) Failure building GFortran (Cygwin)


Dave Korn ha scritto:
Angelo Graziosi wrote on 05 July 2008 12:16:

For the sake of completeness I want to flag that the current snapshot
4.4-20080704 has new failures:

/work/gcc/gcc/ggc-page.c -o ggc-page.o
cc1: warnings being treated as errors
/work/gcc/gcc/ggc-page.c: In function 'alloc_page':
/work/gcc/gcc/ggc-page.c:802: error: request for implicit conversion
from 'void *' to 'char *' not permitted in C++
/work/gcc/gcc/ggc-page.c:845: error: request for implicit conversion
from 'void *' to 'struct page_entry *' not permitted in C++
make[3]: *** [ggc-page.o] Error 1

But I am confused in any case: Why 'not permitted in C++'?
Isn't xgcc a C compiler?

I am enabling only C,Fortran!

This is probably fallout from Kaveh's current work on making sure gcc stays c++ compatible. Your patch looked good to me, you should send it with a ChangeLog to gcc-patches.

    cheers,
      DaveK

Could this be valid?


gcc/ChangeLog:
2008-07-05  Angelo Graziosi  <angelo.graziosi@alice.it>

	* ggc-page.c (alloc_page):
	Adding explicit cast to xmalloc, xcalloc.


--- gcc-4.4-20080704.orig/gcc/ggc-page.c 2008-06-29 06:39:16.000000000 +0200
+++ gcc-4.4-20080704/gcc/ggc-page.c 2008-07-05 12:00:20.906250000 +0200
@@ -799,7 +799,7 @@
alloc_size = GGC_QUIRE_SIZE * G.pagesize;
else
alloc_size = entry_size + G.pagesize - 1;
- allocation = xmalloc (alloc_size);
+ allocation = (char *)xmalloc (alloc_size);


page = (char *) (((size_t) allocation + G.pagesize - 1) & -G.pagesize);
head_slop = page - allocation;
@@ -842,7 +842,7 @@
struct page_entry *e, *f = G.free_pages;
for (a = enda - G.pagesize; a != page; a -= G.pagesize)
{
- e = xcalloc (1, page_entry_size);
+ e = (struct page_entry *)xcalloc (1, page_entry_size);
e->order = order;
e->bytes = G.pagesize;
e->page = a;



Thanks, Angelo.


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