It came to my attention the following fact: order of function evaluation, for example in a sum, is unspecified in the standard, and can therefore be performed in any order.
This raises the question: is it compiler dependent, optimization dependent, or potentially even execution dependent (I doubt it, it may involve reshuffling of the code, but in today's multicore environments, I guess some compilers may see a chance for optimization in this lack of specification, by implicitly performing the two calls in parallel) ?
Edit: I want to clarify. The fact that order is unspecified in the standard, does not imply it's unspecified for a particular compiler (which may choose to make it specified in the documentation, I assume). Unspecified behavior may make you non-portable, but the compiler may behave consistently according to a given rule. I am interested in knowing, purely for academic curiosity, if this specification is actually made by compilers (e.g. in the manual) and if yes, if this choice is consistent or may be altered by compiler options or other factors. Example, take gcc. How does it behave? is it consistent ?