From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8432 invoked by alias); 8 Aug 2011 18:49:30 -0000 Received: (qmail 8415 invoked by uid 22791); 8 Aug 2011 18:49:29 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Aug 2011 18:49:09 +0000 Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id p78In8ce019869 for ; Mon, 8 Aug 2011 11:49:08 -0700 Received: from qyk34 (qyk34.prod.google.com [10.241.83.162]) by wpaz21.hot.corp.google.com with ESMTP id p78IhnJG007813 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 8 Aug 2011 11:49:07 -0700 Received: by qyk34 with SMTP id 34so2022661qyk.17 for ; Mon, 08 Aug 2011 11:49:07 -0700 (PDT) Received: by 10.224.182.146 with SMTP id cc18mr4548798qab.75.1312829347683; Mon, 08 Aug 2011 11:49:07 -0700 (PDT) Received: by 10.224.182.146 with SMTP id cc18mr4548791qab.75.1312829347591; Mon, 08 Aug 2011 11:49:07 -0700 (PDT) Received: from coign.google.com (dhcp-172-29-75-91.cam.corp.google.com [172.29.75.91]) by mx.google.com with ESMTPS id p15sm4576954qct.34.2011.08.08.11.49.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Aug 2011 11:49:06 -0700 (PDT) From: Ian Lance Taylor To: Romain Geissler Cc: gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: PATCH RFA: Build stages 2 and 3 with C++ References: <275E76F7-69B1-408C-9DC6-2C08BDBB5036@gmail.com> Date: Mon, 08 Aug 2011 18:49:00 -0000 In-Reply-To: <275E76F7-69B1-408C-9DC6-2C08BDBB5036@gmail.com> (Romain Geissler's message of "Mon, 8 Aug 2011 19:42:34 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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: 2011-08/txt/msg00172.txt.bz2 Romain Geissler writes: > This new build behavior broke former plugins built with gcc. Indeed, > all cc1 function symbols are now mangled and thus with the current > trunk, plugins should also look for mangled symbols (and so built > with g++). > > What's the new GCC policy about that ? Do plugins have to be built > using g++ only, or does the plugin developer have the choice to > use both gcc and g++ according to it's need (at the cost of adding > extern "C" {=E2=80=A6} in almost every headers to forbid mangling) ? I think that ideally we would have a well-defined plugin interface, plugins would stick to calling that, and that interface would be a C interface. (I see that gcc-plugin.h does already provide a C interface even when gcc is compiled with C++.) However, since we currently permit plugins to call anything in gcc, I think the answer is going to have to be that plugins which do that should be compiled with C++. I don't think that adding extern "C" to all gcc header files is the right approach. Adding extern "C" to a few selected header files seems fine. Ian