From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25396 invoked by alias); 23 Oct 2002 22:35:25 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25385 invoked from network); 23 Oct 2002 22:35:24 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 23 Oct 2002 22:35:24 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g9NMDxw03532 for ; Wed, 23 Oct 2002 18:13:59 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9NMZOf01468 for ; Wed, 23 Oct 2002 18:35:24 -0400 Received: from localhost.redhat.com (IDENT:9BwxlgqPHKwlO1hd2UMcBEa1wPxdjIby@tooth.toronto.redhat.com [172.16.14.29]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9NMZJ025313; Wed, 23 Oct 2002 18:35:19 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id 8D49FFF79; Wed, 23 Oct 2002 18:32:34 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15799.9088.601916.908293@localhost.redhat.com> Date: Wed, 23 Oct 2002 15:35:00 -0000 To: David Carlton Cc: gdb-patches@sources.redhat.com, Elena Zannoni , Jim Blandy Subject: Re: [patch] useless code in symtab.c In-Reply-To: References: X-SW-Source: 2002-10/txt/msg00484.txt.bz2 David Carlton writes: > In my eternal quest to understand symtab.c, I found an unnecessary > declaration and a function that is never called; here's a patch to > delete them. I have no idea what was up with the > find_template_name_end declaration, but nobody in symtab.c calls it > any more; and cplusplus_hint's functionality has been moved into > cplusplus_error. > that's a coincidence, I was just looking at this code myself, and wondering. > No new regressions. This patch seems obvious; I'll commit it in a > couple of days unless somebody complains. > yes. Can you also knock out the one at: linespec.c:38:extern char *find_template_name_end (char *); Thanks Elena > David Carlton > carlton@math.stanford.edu > > 2002-10-23 David Carlton > > * symtab.c: Delete cplusplus_hint. > Delete prototype for find_template_name_end. > > Index: symtab.c > =================================================================== > RCS file: /cvs/src/src/gdb/symtab.c,v > retrieving revision 1.70 > diff -u -p -r1.70 symtab.c > --- symtab.c 20 Sep 2002 14:58:58 -0000 1.70 > +++ symtab.c 23 Oct 2002 21:04:54 -0000 > @@ -50,11 +50,6 @@ > #include > #include "cp-abi.h" > > -/* Prototype for one function in parser-defs.h, > - instead of including that entire file. */ > - > -extern char *find_template_name_end (char *); > - > /* Prototypes for local functions */ > > static void completion_list_add_name (char *, char *, int, char *, char *); > @@ -120,19 +115,6 @@ struct type *builtin_type_error; > value_of_this. */ > > const struct block *block_found; > - > -/* While the C++ support is still in flux, issue a possibly helpful hint on > - using the new command completion feature on single quoted demangled C++ > - symbols. Remove when loose ends are cleaned up. FIXME -fnf */ > - > -static void > -cplusplus_hint (char *name) > -{ > - while (*name == '\'') > - name++; > - printf_filtered ("Hint: try '%s or '%s\n", name, name); > - printf_filtered ("(Note leading single quote.)\n"); > -} > > /* Check for a symtab of a specific name; first in symtabs, then in > psymtabs. *If* there is no '/' in the name, a match after a '/'