This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [RFA] More completion improvements


Kevin Buettner wrote:
> 
> On Feb 18, 12:53pm, Fernando Nasser wrote:
> 
> I took another look, and I don't see the style that I was objecting to
> used *anywhere* with add_show_from_set().  Perhaps, I was not clear
> enough in my original message.  What I find (mildly) objectionable is
> changing code which looks like this:
> 
>     add_show_from_set (add_set_cmd (...), &showlist);
> 
> to:
> 
>     add_show_from_set ((c = add_set_cmd (...)), &showlist);
> 
> Note the addition of an embedded assignment expression.  Instead, if
> it becomes necessary to add an assignment, it should be added as a
> separate statment, thusly:
> 
>     c = add_set_cmd (...);
>     add_show_from_set (c, &showlist);
> 

I see what you mean now.  I thought you were referring to the 1st form.

Yes, the second one has side effects and should be split.

Eli, can you do that before checking it in?

Thanks. 


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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