This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: fix PR symtab/11464


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]