From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31258 invoked by alias); 4 Sep 2011 20:09:45 -0000 Received: (qmail 31245 invoked by uid 22791); 4 Sep 2011 20:09:39 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_CX,TW_SF X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 04 Sep 2011 20:09:23 +0000 From: "marc.glisse at normalesup dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap Date: Sun, 04 Sep 2011 20:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marc.glisse at normalesup dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00270.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46333 Marc Glisse changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marc.glisse at normalesup | |dot org --- Comment #21 from Marc Glisse 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 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).