Re: [RFA-v2] testsuite: Avoid auto-import warning on cygwin/mingw

Pedro Alves
2009-10-02T22:19:02Z

A Friday 02 October 2009 22:35:38, Pierre Muller escreveu:
>
> > -----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?

Yes. I would prefer then that the dead code isn't made
live and untested for no good reason. I'd rather having it
removed, or if you prefer, go ahead apply the patch you
had before, the one that didn't touch the aix and irix bits, and
I'll remove the dead code afterwards.

--
Pedro Alves