New warning in Xcode 7
New warning in Xcode 7
- Subject: New warning in Xcode 7
- From: Graham Cox <email@hidden>
- Date: Wed, 14 Oct 2015 09:24:07 +1100
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 operation is undefined? Surely a preincrement is defined to happen first, that’s why it’s called a PREincrement? Or does the warning refer to something else? I’ve used this form of expression for years without any issues, why is it suddenly one?
—Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden