http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46333
Marc Glisse <marc.glisse at normalesup dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marc.glisse at normalesup | |dot org --- Comment #21 from Marc Glisse <marc.glisse at normalesup dot org> 2011-09-04 20:08:49 UTC --- Since I went through the same thing recently: (In reply to comment #0) > ENUM_BITFIELD mixes integers and enums. > Fix: > #if (GCC_VERSION > 2000) > #define ENUM_BITFIELD(TYPE, NAME, SIZE) __extension__ enum TYPE NAME : SIZE > #elif defined(__cplusplus) > #define ENUM_BITFIELD(TYPE, NAME, SIZE) enum TYPE NAME > #else > #define ENUM_BITFIELD(TYPE, NAME, SIZE) unsigned int > #endif Patch posted at: http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00758.html > some problem with obstack_free, I didn't investigate. > Maybe substraction involving void* NULL or 0? > Fix, obstack.h before: > Before: > # define obstack_free(h,obj) \ > ( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ > > After, add cast to char*: > # define obstack_free(h,obj) \ > ( (h)->temp = (char *) ((char*)(obj)) - (char *) (h)->chunk, \ Bug in sunpro, reported and fixed in the development version (but possibly not for 12.3). > There are also problems then compiling gmp in tree. > I had to remove its #include <iosfwd> on Solaris because > that pulled in locale and there was some problem. > Maybe due to local hacks? I removed all the locale stuff from my gcc/gmp. CC is not a standard C++ compiler, you have to add -library=stlport4 to get it to even try. (In reply to comment #1) > also lots of warnings about mixing extern "C" and not: Seems ok to ignore those that are only warnings. > and other errors related, mixing said in ternary, like: > > foo = foo2 ? foo2 : foo3; > (as in reallocator = set->reallocator ? set->reallocator : xrealloc) > > > where foo2 and foo3 vary in extern C-ness. > workaround is > foo = foo2 > if (!foo) > foo = foo3 > > even though that doesn't seem different enough -- I understand there is the > problem of figuring out a type for the ternary operator, but there is also the > matter of being able to assign the function pointers This one is also Bug 50177. There is also Bug 50167. > here's an example of the obtack_free problem, either I didn't get all the > obstack.h files fixed or the cast needs to be void* or something: > > "../../gcc-4.5/libcpp/files.c", line 1193: Error: Cannot assign char* to int. Patch posted at: http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00758.html (In reply to comment #7) > rtl.c, change: > > #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) sizeof FORMAT - 1 , > > to: > > #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) sizeof (FORMAT) - 1 , > > seems to work. Seems preferable too. Bug in sunpro, reported and fixed in the development version (but possibly not for 12.3).