Correct. There are holes in the definition of the C language. IIRC the official specification even holds an appendix with issues that the compiler designer has to solve, and has to publish how he did solve them. One of those issues is the order in which side effects may occur, e.g. does i=i++; modify i or not? Your defense against such things is very easy: 1) don't create statements that are ambiguous. In your example, split the line in a couple of lines and use temporary variables, so the parameters get evaluated in the order you choose. 2) or switch to an unambiguous language, such as Java and C# :)
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages