From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26896 invoked by alias); 15 Dec 2010 11:50:37 -0000 Received: (qmail 26884 invoked by uid 22791); 15 Dec 2010 11:50:36 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Dec 2010 11:50:32 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 682691B402A; Wed, 15 Dec 2010 11:50:30 +0000 (UTC) From: Mike Frysinger To: Joel Brobecker Subject: Re: [PATCH] sim: add --map-info option Date: Wed, 15 Dec 2010 11:50:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.37-rc5; KDE/4.5.2; x86_64; ; ) Cc: gdb-patches@sourceware.org, Stephen.Kilbane@analog.com, Stuart.Henderson@analog.com, David.Gibson@analog.com References: <1291219863-18458-1-git-send-email-vapier@gentoo.org> <201012141016.23030.vapier@gentoo.org> <20101215045407.GW2596@adacore.com> In-Reply-To: <20101215045407.GW2596@adacore.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4654669.5aRbWlBqBM"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201012150649.42241.vapier@gentoo.org> 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: 2010-12/txt/msg00290.txt.bz2 --nextPart4654669.5aRbWlBqBM Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 983 On Tuesday, December 14, 2010 23:54:07 Joel Brobecker wrote: > > > Wouldn't it make sense to hoist the assignment to memory out of > > > the for initial assignment? It's never changed during the loop... > >=20 > > i dont understand ... isnt this the whole purpose of the first clause > > of the for statement ? initializing things once that dont change > > inside of the loop. >=20 > The code works, and I'm fine if you really want to keep it that way. > But you said "initializing things once that dont change inside of the > loop" and that is not true. You would typically initialize the > variables used in the looping condition, and these variables change > at each iteration. *shrug* i guess we view the purpose of the first clause slightly differentl= y.=20=20 i'm ok with changing the style as you suggest since that seems to be the mo= re=20 common method used in the rest of the code base. so i've committed this now with the memory init moved to the memory decl. -mike --nextPart4654669.5aRbWlBqBM Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iQIcBAABAgAGBQJNCKtWAAoJEEFjO5/oN/WB9CwQAML1KntWI429T6IropYmeGlN 2Cy/lTFASIVULr+w7Bw+8zqghZ90zAEoHsPBH5/e4K/jlMWIo38gABsjugehRFHI Tdirt57oks3HmKml2Nj1867Ahs3esfDc9oLwdb4b6GN2QnGHwLQgihutA87jfcvy XYMi7VZax529JO3r9ZrtVyyoxPtEZTDwP4QYcCterUFqVvkRxUhyxBhqRcbXb3lQ zbRN59KQoWb1OkzIKBw1BvrYRMT1gSgzyvOWW387FWsINdRfVOBu8TtiI9oX3WiY ofTHbm67UOIjarzZlbUsZ9GidxYroo94zzT/h5IR8Y3c/FjLI3OonRiAEiTcZERZ Oitk7twS4lycZ6ZhlMzwM7UTZeM/0b1JseEMC8gtpxKfqgkFU9shHhcGk39JN+gI aSQbejfeSo30Tijt3IRslD4oKmOF4eP2lKb4OyvQqZLielN+3FEbQSFBXucBFDXV WX1Z0qXrDgFt+h4FARprJOrk/cg04cOJKgpKXCCzVgTWnMIr2oUYEn173yG0PEnU Ro3Uj4YnvavqWEhdZMClbsuxgVereDDmnk3lqAC9fiqYoiBTqJM4cubEKkmUTsvk nEafBkxHDvy3DDRv8qe7oiigi95J6Ed0xE8aE5tgg8UJ7S3lQYPA/zvavQV/6kQd nbcOuHpuf3kRoNfJvstY =Z57q -----END PGP SIGNATURE----- --nextPart4654669.5aRbWlBqBM--