SIMPLE: A language-independent tree IR
Joe Buck
jbuck@synopsys.COM
Thu Jan 3 12:41:00 GMT 2002
> > And what of this case:
> >
> > T = foo (f(), (g(x), h(y)) )
> >
> > Is the call ordering g, f, h legal?
> > Take a look at the example in 3.3.2.2 (c89) before you answer...
>
> I believe this issue was dealt with in C99. In C89, there was a
> question as to even whether the instructions of f and g could be
> interleaved; in C99, a more formal specification was adopted and I
> believe the answer came out 'no'.
Since we have the as-if rule, that's not quite the answer; we can only
say that the visible side effects (accesses to volatile variables,
calls to other functions that may have side effects) cannot be
interleaved. If f, g, and h are inlined, we could have considerable
freedom to do reordering despite the C99 rules.
More information about the Gcc
mailing list