It doesn't matter what you get; that's the point. The results are undefined. The compiler can do anything it likes. What it chooses to do is allowed to change with the next version. The standard does define the order of the additions, but it doesn't define the order of evaluating the expressions PRIOR TO the additions.
As I said, read about sequence points. Playing with undefined operation may seem like fun but it's totally wasted time, since you can't depend upon your results being repeatable from compiler to compiler.
Code correctness is not determined by what the compiler does; it's determined by the standards. Compiler correctness is determined by the standard. In the event the standard chooses not to define something (hardware implementations may make it infeasible to define some operations), the compiler writer may do as he wishes. And change what he does whenever he wishes.
Last edited by DaWei; 22Aug2007 at 12:02..