From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25863 invoked by alias); 21 Dec 2012 12:23:30 -0000 Received: (qmail 25850 invoked by uid 22791); 21 Dec 2012 12:23:27 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Dec 2012 12:23:21 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 106BCA52DA; Fri, 21 Dec 2012 13:23:20 +0100 (CET) Date: Fri, 21 Dec 2012 12:23:00 -0000 From: Richard Biener To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org, laurent@guerby.net Subject: Re: [PATCH] Include gmp.h from system.h to fix PR54659 In-Reply-To: <1566647.uGP6oVgNTF@polaris> Message-ID: References: <1566647.uGP6oVgNTF@polaris> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg01310.txt.bz2 On Fri, 21 Dec 2012, Eric Botcazou wrote: > > This runs into issues with Ada which basically does (ugh) > > > > #ifdef __cplusplus > > extern "C" { > > #endif > > > > #include "system.h" > > > > #endif __cplusplus > > } > > #endif > > > > which of course wrecks any system header doing __cplusplus > > conditional stuff (such as gmp.h including iosfwd). The patch > > un-kludges this by wrapping system.h inside extern "C++" when > > compiling with the C++ frontend. > > > > But - really - Ada people - can you fix that on your side please? > > (CCed people doing r176210) > > Like so? I cannot believe that all this fuss was about moving 3 lines within > less than a dozen of files... The patch looks fine to me (though it's not 100% obvious to me as not only system headers are now no longer in extern "C" - which is why I simply tried the un-wrapping). So, if you think that's ok please commit it. It certainly helps not to rely on compilers handling nested extern "foo" correctly ... Thanks, Richard.