[patch] physname regression: Non-matching type false breakpoint

Pedro Alves pedro@codesourcery.com
Tue Jun 7 16:58:00 GMT 2011


On Monday 06 June 2011 22:19:43, Jan Kratochvil wrote:
> On Mon, 06 Jun 2011 11:21:30 +0200, Pedro Alves wrote:
> > I have trouble parsing this sentence.
> 
> I agree the original sentence by me was bogus.
> 
> 
> > +  /* If we found a single field with that name, and we were not given
> > +     a specific overload instance in COPY, accept the field, if it's
> > +     really a method.  */
> > +  if (i1 == 1 && strchr (copy, '(') == NULL)
> 
> The point was IMO not when to accept the field but rather when to reject it
> - that an additional comparison is needed.  Adjusted the text.

That justifies the patch/change, but looking at the resulting code, it
looked to me a bit better to justify when can the i1 == 1 special case
be applied (the code directly under the comment).
Anyway, glass half full vs glass half empty.  :-)  Your version is fine
with me.

> -  if (i1 == 1)
> +  /* If we were given a specific overload instance in COPY defer the field
> +     acceptance till the strcmp_iw verification below even if we found just
> +     a single field with that name.  */

I suggest a comma after "COPY", and another after "below".

-- 
Pedro Alves



More information about the Gdb-patches mailing list