From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22448 invoked by alias); 23 Oct 2002 22:27:26 -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 22432 invoked from network); 23 Oct 2002 22:27:26 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 23 Oct 2002 22:27:26 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id g9NMRPJ18660; Wed, 23 Oct 2002 15:27:25 -0700 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: gdb-patches@sources.redhat.com Cc: Elena Zannoni , Jim Blandy Subject: [patch] useless code in symtab.c From: David Carlton Date: Wed, 23 Oct 2002 15:27:00 -0000 Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-10/txt/msg00483.txt.bz2 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. No new regressions. This patch seems obvious; I'll commit it in a couple of days unless somebody complains. 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 '/'