From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1481 invoked by alias); 2 Oct 2009 22:19:02 -0000 Received: (qmail 1463 invoked by uid 22791); 2 Oct 2009 22:19:00 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Oct 2009 22:18:56 +0000 Received: (qmail 21871 invoked from network); 2 Oct 2009 22:18:54 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Oct 2009 22:18:54 -0000 From: Pedro Alves To: "Pierre Muller" Subject: Re: [RFA-v2] testsuite: Avoid auto-import warning on cygwin/mingw Date: Fri, 02 Oct 2009 22:19:00 -0000 User-Agent: KMail/1.9.10 Cc: tromey@redhat.com, gdb-patches@sourceware.org References: <000f01ca42e3$e13cad60$a3b60820$@u-strasbg.fr> <000601ca43a8$49a83e90$dcf8bbb0$@u-strasbg.fr> In-Reply-To: <000601ca43a8$49a83e90$dcf8bbb0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200910022318.56590.pedro@codesourcery.com> X-IsSubscribed: yes 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/msg00077.txt.bz2 A Friday 02 October 2009 22:35:38, Pierre Muller escreveu: >=20 > > -----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. >=20 > 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. --=20 Pedro Alves