C
cheeser
Hello all,
Consider nested function calls:
foo1(
foo2( foo3()),
foo4(
foo5(),
foo6(foo7())
),
foo8()
);
There are obvious dependencies here such as that foo3() must be called
before foo2(). Other than the required dependencies of this ilk, is there
any guarantee that these 8 function calls will be made in any particular
order?
The two (slightly different) orderings shown below meet the obvious
dependencies just described. What I would like to know though is if they
are *both* within the realm of Standard-conforming behavior.
ORDER 1:
foo7()
foo8()
foo3()
foo5()
foo2()
foo6()
foo4()
foo1()
ORDER 2:
foo7()
foo3()
foo5()
foo2()
foo6()
foo4()
foo8()
foo1()
The obvious concern here is that the lack of a completly well-defined order
could cause the same program to behave differently under two different
compilers.
Thanks,
Dave
Consider nested function calls:
foo1(
foo2( foo3()),
foo4(
foo5(),
foo6(foo7())
),
foo8()
);
There are obvious dependencies here such as that foo3() must be called
before foo2(). Other than the required dependencies of this ilk, is there
any guarantee that these 8 function calls will be made in any particular
order?
The two (slightly different) orderings shown below meet the obvious
dependencies just described. What I would like to know though is if they
are *both* within the realm of Standard-conforming behavior.
ORDER 1:
foo7()
foo8()
foo3()
foo5()
foo2()
foo6()
foo4()
foo1()
ORDER 2:
foo7()
foo3()
foo5()
foo2()
foo6()
foo4()
foo8()
foo1()
The obvious concern here is that the lack of a completly well-defined order
could cause the same program to behave differently under two different
compilers.
Thanks,
Dave