For example:
int foo(int i) { return i; } int main() { int i = 0; i = i++; // Undefined i = foo(i++); // ? return 0; }
What wou
i = foo(i++); is fine, because i++ is executed before foo() is called. A copy of i is made, i is then incremented, then the copy is passed to foo(). It is the same as doing this explicitly:
i = foo(i++);
i++
foo()
i
int tmp = i++; i = foo(tmp);