behaviour of (i++)%3 vs. (++i)%3

There's no reason why different compilers should choose the same behaviour.

Well, that's the thing. It is the same compiler: Gnu gcc 4.7.2

Also, what do you mean "unspecified". I think quite a few would be surprised that the code:

loop and do a=(a++)%3; gives the result 0,1,2,3,4,5,6... completely ignoring the modulo.