This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SIMPLE: A language-independent tree IR
- From: Joe Buck <jbuck at synopsys dot COM>
- To: geoffk at redhat dot com
- Cc: dalej at apple dot com, pkoning at equallogic dot com,toon at moene dot indiv dot nluug dot nl, gcc at gcc dot gnu dot org
- Date: Thu, 3 Jan 2002 12:41:36 -0800 (PST)
- Subject: Re: SIMPLE: A language-independent tree IR
> > 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.