From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10157 invoked by alias); 19 Jun 2008 12:25:45 -0000 Received: (qmail 10128 invoked by uid 22791); 19 Jun 2008 12:25:44 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 19 Jun 2008 12:25:04 +0000 Received: from zps76.corp.google.com (zps76.corp.google.com [172.25.146.76]) by smtp-out.google.com with ESMTP id m5JCOtdh001541; Thu, 19 Jun 2008 13:24:56 +0100 Received: from smtp.corp.google.com (spacemonkey3.corp.google.com [192.168.120.116]) by zps76.corp.google.com with ESMTP id m5JCOs7r025669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 19 Jun 2008 05:24:55 -0700 Received: from localhost.localdomain.google.com (unassigned-114.072.NetSurf.Net [66.135.114.72] (may be forged)) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id m5JCOn13026213 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 19 Jun 2008 05:24:51 -0700 To: "Gabriel Dos Reis" Cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: gcc-in-cxx branch created References: <206fcf960806190347l5ea21e63reeef116180668402@mail.gmail.com> From: Ian Lance Taylor Date: Thu, 19 Jun 2008 12:25:00 -0000 In-Reply-To: <206fcf960806190347l5ea21e63reeef116180668402@mail.gmail.com> (Gabriel Dos Reis's message of "Thu\, 19 Jun 2008 05\:47\:27 -0500") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg00419.txt.bz2 [ Dropping gcc-patches. ] "Gabriel Dos Reis" writes: >> I have not yet committed any patches to the branch--at present it is >> just a copy of the trunk. I will start committing patches soon, and >> anybody else may submit patches as well. The branch will follow the >> usual gcc maintainership rules, except that any non-algorithmic >> maintainer may additionally approve or commit patches which permit >> compilation with C++. > > I have a question: I suspect that in concreteness you would prefer declarations > in GCC headers have a C++ linkage, as opposed to C linkage -- except where > for interoperability with common runtime systems, we want the > declarations to have > C linkage (e.g. in libgcc for example). Am I correct? Yes, I think that makes the most sense. > The reason I'm asking is that a fresh build o gcc-in-cxx dies on my machine with > complains that `program' has conflicting declarations: once in > libcpp.h as having > C++ linkage, once in toplev.h with a C declaration. It is the > tradition in modern > C++ to avoid having many `sources' for the same declaration. Yes. I'm working around that for now by editing toplev.h, to avoid pushing libcpp and libiberty to C++ right away. #ifdef __cplusplus extern "C" { #endif /* This is used by cpplib and libiberty. */ extern const char *progname; #ifdef __cplusplus } #endif I'll try to get my current set of patches committed to the branch later today. Ian