Re: New warning in Xcode 7

2015-10-13 Thread Graham Cox
> On 14 Oct 2015, at 9:50 am, Greg Parker wrote: > > You can avoid confusion (human and compiler) by writing the statement without > the preincrement's side effect: >ix = (ix+1) % guess.count; > OK, makes sense. I think my use of the preincrement followed by mod stems from years-old hab

Re: New warning in Xcode 7

2015-10-13 Thread Rick Mann
> On Oct 13, 2015, at 15:50 , Greg Parker wrote: > > >> On Oct 13, 2015, at 3:24 PM, Graham Cox wrote: >> >> In a piece of code I haven’t worked on in a while, I’m suddenly getting a >> new warning which I’ve never seen before: >> >> “Multiple unsequenced modifications to ‘ix’” >> >> Code

Re: New warning in Xcode 7

2015-10-13 Thread John McCall
> On Oct 13, 2015, at 3:24 PM, Graham Cox wrote: > In a piece of code I haven’t worked on in a while, I’m suddenly getting a new > warning which I’ve never seen before: > > “Multiple unsequenced modifications to ‘ix’” > > Code is: > > > ix = ++ix % guess.count; > > where ix is a NSUInteger.

Re: New warning in Xcode 7

2015-10-13 Thread Greg Parker
> On Oct 13, 2015, at 3:24 PM, Graham Cox wrote: > > In a piece of code I haven’t worked on in a while, I’m suddenly getting a new > warning which I’ve never seen before: > > “Multiple unsequenced modifications to ‘ix’” > > Code is: > > ix = ++ix % guess.count; > > where ix is a NSUInteger.

Re: New warning in Xcode 7

2015-10-13 Thread Rick Mann
> On Oct 13, 2015, at 15:24 , Graham Cox wrote: > > In a piece of code I haven’t worked on in a while, I’m suddenly getting a new > warning which I’ve never seen before: > > “Multiple unsequenced modifications to ‘ix’” > > Code is: > > > ix = ++ix % guess.count; > > where ix is a NSUIntege

New warning in Xcode 7

2015-10-13 Thread Graham Cox
In a piece of code I haven’t worked on in a while, I’m suddenly getting a new warning which I’ve never seen before: “Multiple unsequenced modifications to ‘ix’” Code is: ix = ++ix % guess.count; where ix is a NSUInteger. Is this telling me that the order of the preincrement and the mod opera