From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9936 invoked by alias); 10 Jul 2003 22:58:36 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 9782 invoked from network); 10 Jul 2003 22:58:31 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.129.200.2) by sources.redhat.com with SMTP; 10 Jul 2003 22:58:31 -0000 Received: from toenail.toronto.redhat.com (toenail.toronto.redhat.com [172.16.14.211]) by touchme.toronto.redhat.com (Postfix) with ESMTP id EDFCC8000DB; Thu, 10 Jul 2003 18:58:29 -0400 (EDT) Received: from toenail.toronto.redhat.com (IDENT:fche@localhost [127.0.0.1]) by toenail.toronto.redhat.com (8.12.8/8.12.5) with ESMTP id h6AMwToM032765; Thu, 10 Jul 2003 18:58:29 -0400 Received: (from fche@localhost) by toenail.toronto.redhat.com (8.12.8/8.12.8/Submit) id h6AMwSNF032761; Thu, 10 Jul 2003 18:58:29 -0400 X-Authentication-Warning: toenail.toronto.redhat.com: fche set sender to fche@redhat.com using -f To: Andrew Cagney Cc: Mark Kettenis , "H. J. Lu" , binutils@sources.redhat.com, GDB Subject: Re: FYI: A new C++ demangler References: <20030710143557.GA25588@lucon.org> <86znjmp0c4.fsf@elgar.kettenis.dyndns.org> <3F0DD802.6090201@redhat.com> From: fche@redhat.com (Frank Ch. Eigler) Date: Thu, 10 Jul 2003 22:58:00 -0000 In-Reply-To: <3F0DD802.6090201@redhat.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-07/txt/msg00146.txt.bz2 cagney wrote: > [...] > > Could someone fix the old demangler, or write a new one in > > plain C (or re-write the C++ one in C)? Pretty please? > > Yes. There's no reason for the underlying demangler algorithm to be > implemented in vanila ISO C 90, and then wrap it for the C++ side. > [...] You might be accused of dogmatic monolingualism if you don't accept the notion that some such code may be more naturally expressed in a higher level language -- that could be one such reason. Another reason of course is the fact that it is already done and working: rewriting costs new effort. (Note that I'm not asserting that the former reason applies strongly here; libstdc++-v3/include/bits/demangle.h for example doesn't seem to rely much on the C++ language's extra capabilities.) - FChE