This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch] useless code in symtab.c
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: David Carlton <carlton at math dot stanford dot edu>
- Cc: gdb-patches at sources dot redhat dot com, Elena Zannoni <ezannoni at redhat dot com>, Jim Blandy <jimb at redhat dot com>
- Date: Wed, 23 Oct 2002 18:32:32 -0400
- Subject: Re: [patch] useless code in symtab.c
- References: <ro11y6g4wqc.fsf@jackfruit.Stanford.EDU>
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 <carlton@math.stanford.edu>
>
> * 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 <ctype.h>
> #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<TAB> or '%s<ESC-?>\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 '/'