From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17976 invoked by alias); 2 Oct 2009 21:35:45 -0000 Received: (qmail 17966 invoked by uid 22791); 2 Oct 2009 21:35:45 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Oct 2009 21:35:41 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id n92LZNXA088619 ; Fri, 2 Oct 2009 23:35:23 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n92LZMAA024099 ; Fri, 2 Oct 2009 23:35:23 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n92LZLVX029611 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Fri, 2 Oct 2009 23:35:22 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: , "'Pedro Alves'" Cc: References: <000f01ca42e3$e13cad60$a3b60820$@u-strasbg.fr> <200910020123.53952.pedro@codesourcery.com> <009701ca4332$114bda50$33e38ef0$@u-strasbg.fr> <200910021909.47860.pedro@codesourcery.com> In-Reply-To: Subject: RE: [RFA-v2] testsuite: Avoid auto-import warning on cygwin/mingw Date: Fri, 02 Oct 2009 21:35:00 -0000 Message-ID: <000601ca43a8$49a83e90$dcf8bbb0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00073.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Tom Tromey > Envoy=E9=A0: Friday, October 02, 2009 10:57 PM > =C0=A0: Pedro Alves > Cc=A0: Pierre Muller; gdb-patches@sourceware.org > Objet=A0: Re: [RFA-v2] testsuite: Avoid auto-import warning on > cygwin/mingw >=20 > >>>>> "Pedro" =3D=3D Pedro Alves writes: >=20 > >> 'foreach opt $options {' >=20 > 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? >=20 > 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