|
|
I would like to know if the code below is well-defined. |
it looks to me that i is modified twice on lines 19 and 22. |
2) When calling a function (whether or not the function is inline and whether or not function call syntax was used), there is a sequence point after the evaluation of all function arguments (if any) which takes place before execution of any expressions or statements in the function body 3) There is a sequence point after the copying of a returned value of a function and before the execution of any expressions outside the function. http://en.cppreference.com/w/cpp/language/eval_order (at the bottom of the page) |