From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32746 invoked by alias); 21 Dec 2012 11:36:30 -0000 Received: (qmail 30511 invoked by uid 48); 21 Dec 2012 11:35:51 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/54659] [4.8 Regression] Bootstrap with --disable-nls broken under Windows Date: Fri, 21 Dec 2012 11:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 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: 2012-12/txt/msg02104.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54659 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot | |gnu.org --- Comment #7 from Richard Biener 2012-12-21 11:35:46 UTC --- (In reply to comment #4) > On Fri, 26 Oct 2012, dnovillo at google dot com wrote: > > > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54659 > > > > --- Comment #3 from dnovillo at google dot com 2012-10-26 12:34:53 UTC --- > > On Fri, Oct 26, 2012 at 8:05 AM, rguenther at suse dot de > > wrote: > > > > > Fact is that all this stuff happens because gmp.h is not included > > > from system.h ... > > > > I broke Ada when I tried it. I don't remember the details, but it > > seemed tedious to fix. > > I know ... but it's the only way that is designed to avoid this > kind of issues. Trying to see what happens ... The issue is r176210 wrapping everything in #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif _including_ #include statements, including the inclusion of system.h. That of course is totally bogus. What it wants is to make sure exports have C linkage (I assume). A fix is to undo this ... like with the following hack: Index: gcc/system.h =================================================================== --- gcc/system.h (revision 194658) +++ gcc/system.h (working copy) @@ -24,6 +24,11 @@ along with GCC; see the file COPYING3. #ifndef GCC_SYSTEM_H #define GCC_SYSTEM_H +/* Undo extern "C" wrappings done by including files (Ada). */ +#ifdef __cplusplus +extern "C++" { +#endif + /* We must include stdarg.h before stdio.h. */ #include @@ -1051,4 +1056,8 @@ helper_const_non_const_cast (const char #define DEBUG_VARIABLE #endif +#ifdef __cplusplus +} +#endif + #endif /* ! GCC_SYSTEM_H */ but of course even better would be to fix the reason for this hack - why are those Ada files built with a C++ compiler in the first place?! Why does it need to wrap _everything_ inside extern "C"?? Ada people?