From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11111 invoked by alias); 26 Jun 2009 17:59:10 -0000 Received: (qmail 11103 invoked by uid 22791); 26 Jun 2009 17:59:10 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_73,SPF_PASS 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.43rc1) with ESMTP; Fri, 26 Jun 2009 17:59:01 +0000 Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id n5QHwvSa021859 for ; Fri, 26 Jun 2009 18:58:58 +0100 Received: from pxi34 (pxi34.prod.google.com [10.243.27.34]) by wpaz37.hot.corp.google.com with ESMTP id n5QHwtpQ005750 for ; Fri, 26 Jun 2009 10:58:55 -0700 Received: by pxi34 with SMTP id 34so2282055pxi.28 for ; Fri, 26 Jun 2009 10:58:54 -0700 (PDT) Received: by 10.114.145.17 with SMTP id s17mr6353687wad.120.1246039134865; Fri, 26 Jun 2009 10:58:54 -0700 (PDT) Received: from localhost.localdomain.google.com (dhcp-172-22-125-203.mtv.corp.google.com [172.22.125.203]) by mx.google.com with ESMTPS id j28sm6359336waf.32.2009.06.26.10.58.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Jun 2009 10:58:54 -0700 (PDT) To: Robert Dewar Cc: laurent@guerby.net, Arnaud Charlet , Eric Botcazou , Richard Guenther , gcc@gcc.gnu.org Subject: Re: Phase 1 of gcc-in-cxx now complete (Ada) References: <1245966606.4922.217.camel@localhost> <84fc9c000906251516n3a74abe2hcf888f940fccce79@mail.gmail.com> <1246015098.4922.307.camel@localhost> <1246031952.4922.318.camel@localhost> <4A4506ED.1080906@adacore.com> From: Ian Lance Taylor Date: Fri, 26 Jun 2009 18:07:00 -0000 In-Reply-To: <4A4506ED.1080906@adacore.com> (Robert Dewar's message of "Fri\, 26 Jun 2009 13\:35\:41 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-06/txt/msg00621.txt.bz2 Robert Dewar writes: > Ian Lance Taylor wrote: > >> I think the function to change is Gen_Output_File_C in bindgen.adb. > > I don't really see any urgency for this change, yes gnatbind has > the option to generate C, but it is not the normal path, and only > of use in unusual circumstances, so I don't really see the need > for this output to be C++ compatible. The documentation doesn't > claim this after all. gnatbind -C appears to be used when bootstrapping gcc to generate .c files. With --enable-build-with-cxx, those .c files will be compiled with a C++ compiler. The symbols emitted by that compilation need to be linkable with the symbols emitted when compiling Ada code, so the .c files need extern "C" to avoid C++ mangling. Or at least so it seems to me. I may be missing some key step. Ian