Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Order of increment / mask operations?



Cheers Matt, 

Thanks for the input.

> This is undefined, as x is modified twice between sequence points[*]. 
> C99 (6.5p2) says:

Yes, I got that - as soon as the program flaked I realised where I'd gone awry.
It's just that I had "assumed" that bracing the post-increment "(x ++)" before
the & was applied would force an evaluation of x at that point, and would
therefore be one modification of x for one sequence point, with the & operation
another...
But of course that's *not* the way post-increment works. Oops, bother.

Oh well, it's working *correctly* now.

Anyway, I hope others can learn from my mistakes!
Cheers,
-- 
Ian
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.



References: 
 >Re: Order of increment / mask operations? (From: Matt Watson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.