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: [RFA-v2] testsuite: Avoid auto-import warning on cygwin/mingw



> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé?: Friday, October 02, 2009 10:57 PM
> À?: Pedro Alves
> Cc?: Pierre Muller; gdb-patches@sourceware.org
> Objet?: Re: [RFA-v2] testsuite: Avoid auto-import warning on
> cygwin/mingw
> 
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
> 
> >> 'foreach opt $options {'
> 
> Pedro> Hmmm, I would have thought that foreach would still
> Pedro> only iterate over the original elements of $options (since
> foreach
> Pedro> takes the values of $options, not the variable reference),
> Pedro> no matter if you lappend to options; or am I confused, and
> Pedro> does it really keep iterating over newly append items?
> 
> You are not confused -- you are correct about this.
> "$options" is substituted when the statement is parsed, not on each
> loop
> iteration.

This confirms that the current additions to options
are finally discarded by the
set options $new_options
a few lines down,
and that my patch is correct, no?

May I commit this?

Pierre





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