Timo Kreuzer wrote:
This case isn't that bad. We just have the
following requirement:
Do not make any assumptions about the order in which code is executed
inside the try block!
Not even if normally you could say that something must be executed in a
special order (like x = func1(); y = func2(x);)
Functions are called in the order you expect, unless the compiler is
able to analyze/inline them (such as static/inline functions) or unless
the code is written in a manner where the order is not defined by the
specification of the language (e.g. multiple calls to functions in
arguments for a function call). Anything the compiler doesn't know at
compile-time won't be re-ordered. This applies to all optimizers
(link-time optimizations may allow to re-order them though).
Thomas