On 04/25/2016 03:30 PM, Trevor Saunders wrote:
On Mon, Apr 25, 2016 at 02:28:51PM +0200, Bernd Schmidt wrote:
On 04/20/2016 08:22 AM, tbsaunde+...@tbsaunde.org wrote:
From: Trevor Saunders <tbsaunde+...@tbsaunde.org>
+ unsigned int len = cond_list.length ();
+ for (unsigned int i = len - 1; i < len; i--)
This is a really icky way to write a loop, the i < len condition makes it
look like a forward one. We have FOR_EACH_VEC_ELT{,_REVERSE}, any reason not
to use these?
I'll agree that depending on unsigned wrapping is a tad wierd, but
personally I think FOR_EACH_VEC_* are pretty icky, and just forget to
think about them before writing a loop.
They're standard inside gcc though, and readability-wise much
preferrable to the above IMO.
I noticed this pattern in a lot of these patches; at this point I think
the best thing to do would be for you to go through all of them, address
review comments across the whole set, and then start a new thread with
v2 patches of all of them so we can retire this thread.
Bernd