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: Geoff Keating <geoffk at geoffk dot org>
- To: dalej at apple dot com
- Cc: pkoning at equallogic dot com, dalej at apple dot com, toon at moene dot indiv dot nluug dot nl, gcc at gcc dot gnu dot org
- Date: Thu, 3 Jan 2002 12:35:50 -0800
- Subject: Re: SIMPLE: A language-independent tree IR
- References: <1C08A665-0079-11D6-94EE-003065C86F94@apple.com>
- Reply-to: Geoff Keating <geoffk at redhat dot com>
> Date: Thu, 3 Jan 2002 10:38:41 -0800
> Cc: Dale Johannesen <dalej@apple.com>, geoffk@redhat.com,
> toon@moene.indiv.nluug.nl, gcc@gcc.gnu.org
> From: Dale Johannesen <dalej@apple.com>
>
>
> On Thursday, January 3, 2002, at 10:28 AM, Paul Koning wrote:
>
> >>>>>> "Geoff" == Geoff Keating <geoffk@geoffk.org> writes:
> > Geoff> You're probably thinking of
> >
> > Geoff> T = (f() + g()) compared to T = (f(), g())
> >
> > Geoff> in the first one, the compiler is (probably) permitted to call
> > Geoff> g before f, but not in the second.
> >
> > The comma operator rule is pretty strange, given that the third
> > example:
> >
> > T = foo (f(), g(x))
> > (i.e., comma a actual argument separator) DOES allow g to be called
> > before f...
>
> 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'.
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>