This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: fix PR symtab/11464
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 3 Feb 2013 06:45:02 +0100
- Subject: Re: RFC: fix PR symtab/11464
- References: <87hamovmu7.fsf@fleche.redhat.com>
On Thu, 10 Jan 2013 20:50:56 +0100, Tom Tromey wrote:
> 2013-01-10 Tom Tromey <tromey@redhat.com>
>
> PR symtab/11464:
> * c-exp.y (lex_one_token): Initialize other fields of yylval on
> NAME return.
> (classify_inner_name): Remove 'first_name' argument, add
> 'context'. Remove unused variable.
> (yylex): Explicitly maintain the context type. Exit loop earlier
> if NAME result is seen.
>
> 2013-01-10 Tom Tromey <tromey@redhat.com>
>
> * gdb.cp/m-static.cc (gnu_obj_1::~gnu_obj_1): New destructor.
> * gdb.cp/m-static.exp: Add tests to print quoted destructor.
I do not see there a regression; this does not mean much for c-exp.y.
>
> diff --git a/gdb/c-exp.y b/gdb/c-exp.y
> index 9847120..9ef4b39 100644
> --- a/gdb/c-exp.y
> +++ b/gdb/c-exp.y
> @@ -2978,6 +2985,11 @@ yylex (void)
> current.token = classification;
>
> last_was_coloncolon = 0;
> +
> + if (classification == NAME)
> + break;
IIUC this is a parsing cleanup unrelated to this bug.
> +
> + context_type = yylval.tsym.type;
> }
> else if (next.token == COLONCOLON && !last_was_coloncolon)
> last_was_coloncolon = 1;
Thanks,
Jan