From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26602 invoked by alias); 22 Oct 2011 07:06:21 -0000 Received: (qmail 26588 invoked by uid 22791); 22 Oct 2011 07:06:19 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail4-relais-sop.national.inria.fr (HELO mail4-relais-sop.national.inria.fr) (192.134.164.105) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 22 Oct 2011 07:06:03 +0000 Received: from ip-133.net-81-220-116.brest.rev.numericable.fr (HELO laptop-mg.local) ([81.220.116.133]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Oct 2011 09:06:01 +0200 Date: Sat, 22 Oct 2011 08:03:00 -0000 From: Marc Glisse To: Ian Lance Taylor cc: gcc-patches@gcc.gnu.org Subject: Re: Ping: demangle C++ extern "C" functions In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; 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: 2011-10/txt/msg02058.txt.bz2 Thank you for your comments. On Fri, 21 Oct 2011, Ian Lance Taylor wrote: > Marc Glisse writes: > >>> _Z1aIFYviEEvPT_ >>> void a(void (*)(int) extern "C") > > Does g++ ever actually generate a symbol name like this? Is it worth > worrying about? g++ doesn't currently generate those, but I would like to change that (c++/2316). And nothing prevents another compiler from actually implementing the itanium C++ ABI (this code is mostly for binutils if I understand correctly). I thought it made sense to submit independent pieces first, but if it is preferable to wait until everything is ready (not soon) I understand. > Personally if we are going to print this at all I think the extern "C" > should be in square brackets. E.g., > > void a(void (*)(int) [extern "C"]) Hey, that looks nice! It doesn't look like attributes (in double square brackets) get mangled, so it shouldn't look strange (and it could always be changed in that case). -- Marc Glisse