This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]