Why is the order of evaluation for function parameters undefined in c++?
- by kunj2aan
The standard doesn't specify the order of evaluation of arguments with this line:
The order of evaluation of arguments is unspecified.
What does
Better code can be generated in the absence of restrictions on
expression evaluation order
imply?
What is the drawback in asking all the compilers to evaluate the function arguments Left to Right for example? What kinds of optimizations do compilers perform because of this undefined spec?