On Sat, Feb 9, 2013 at 3:49 PM, Jay K <jay.kr...@cornell.edu> wrote: > problems compiling 4.7, with Solaris cc and/or Solaris CC (C++) > > > 1) ENUM_BITFIELD is not portable. I've reported this before. > > > It should be more like: > > > #ifdef __cplusplus > #define ENUM_BITFIELD(TYPE, NAME, SIZE) enum TYPE NAME : SIZE > #elif (GCC_VERSION > 2000) > #define ENUM_BITFIELD(TYPE, NAME, SIZE) __extension__ enum TYPE NAME : SIZE > #else > #define ENUM_BITFIELD(TYPE, NAME, SIZE) unsigned int NAME : SIZE > #endif
Could you explain why the current way is not correct? Which does: #ifdef __cplusplus #define ENUM_BITFIELD(TYPE) enum TYPE #elif (GCC_VERSION > 2000) #define ENUM_BITFIELD(TYPE) __extension__ enum TYPE #else #define ENUM_BITFIELD(TYPE) unsigned int #endif Which is no different from what you have above really. > > > and then modify the uses to fit -- three parameters. > > > It is likely that in 4.8 this is moot, as the C++ case will be the only one > remaining. > > > 2) given: > > int foo() > { > gcc_unreachable(); > } > > > Solaris cc/CC gives a warning or maybe an error. That is a bug with Oracle's compilers as nothing after gcc_unreachable is reachable > It should be: > > > int foo(void) > { > gcc_unreachable(); > return 0; > } > > > This occurs a few times e.g. in i386.md. > > > Despite me being uncertain between warnings and errors and cc and CC, > these do definitely show up as problems. > I've been building a few versions of gcc through the years from 4.2 > and up (yeah, yeah, I know it goes back much further) with a variety > of host compilers, mostly a few versions of gcc/g++ but sometimes Solaris > cc/CC, > maybe others, and I've had to patch these repeatedly. Again, today, in 4.7. > > > I do use -disable-bootstrap, to drastically cut build times. Cut build times but depends on bugs in the compiler which compiles stage1. > It is possible that contributes to "the problem", but I also think these > are reasonable changes and -disable-bootstrap is really nice to use, it > saves a lot of time and these aren't awful ancient non-optimizing host > compilers. Except some host compilers have bugs. That is the point of the bootstrap rather than the non-optimizing host compilers. As show above Oracle's compilers have bugs already. Thanks, Andrew Pinski