From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18359 invoked by alias); 7 Nov 2014 08:42:20 -0000 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 Received: (qmail 18311 invoked by uid 48); 7 Nov 2014 08:42:16 -0000 From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/63699] bootstrap fails with Apple clang 6.0 Date: Fri, 07 Nov 2014 08:42: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-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fxcoudert at gcc dot gnu.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-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg00408.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63699 Francois-Xavier Coudert changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fxcoudert at gcc dot gnu.org --- Comment #3 from Francois-Xavier Coudert --- A minimal testcase for this is: #include "safe-ctype.h" #include with the safe-ctype.h from trunk. Apparently, the C++ header uses the type functions, which are poisoned by GCC's safe-ctype.h header. The proper fix, in my opinion, is to include before "safe-ctype.h", which is itself included in gcc/system.h. The same logic already appears in go/go-system.h, which says: // We don't really need iostream, but some versions of gmp.h include // it when compiled with C++, which means that we need to include it // before the macro magic of safe-ctype.h, which is included by // system.h. Here's the suggested patch, which I can't test right now unfortunately. Feel free to submit it for review: Index: plugin.cc =================================================================== --- plugin.cc (revision 217000) +++ plugin.cc (working copy) @@ -31,6 +31,8 @@ #undef PACKAGE_TARNAME #undef PACKAGE_VERSION +#include + #include "gcc-plugin.h" #include "system.h" #include "coretypes.h" @@ -55,8 +57,6 @@ #include "connection.hh" #include "rpc.hh" -#include - #ifdef __GNUC__ #pragma GCC visibility push(default) #endif