Re: Enforcing order of execution for function arguments

2007-01-13 Thread Segher Boessenkool
Actually, I was thinking about the case "g(a(), b());". Let's imagine the gimplified code (because of your change) looks like: t1 = a(); t2 = b(); g(t1, t2); Are we always sure that t1 and t2 will not be pushed again in the CALL_EXPR by further transformations? No, and that's a good thing. W

Re: Enforcing order of execution for function arguments

2007-01-10 Thread Roberto COSTA
Andrew Haley wrote: Roberto COSTA writes: > Andrew Haley wrote: > > Chris Jefferson writes: > > > > > One thing which comes up regularly in various C and C++ > > > messageboards is that statements like "f() + g()" and "a(f(), g())" > > > do not declare which order f() and g() will be

Re: Enforcing order of execution for function arguments

2007-01-10 Thread Andrew Haley
Roberto COSTA writes: > Andrew Haley wrote: > > Chris Jefferson writes: > > > > > One thing which comes up regularly in various C and C++ > > > messageboards is that statements like "f() + g()" and "a(f(), g())" > > > do not declare which order f() and g() will be executed in. > > > >

Re: Enforcing order of execution for function arguments

2007-01-10 Thread Roberto COSTA
Andrew Haley wrote: Chris Jefferson writes: > One thing which comes up regularly in various C and C++ > messageboards is that statements like "f() + g()" and "a(f(), g())" > do not declare which order f() and g() will be executed in. > > How hard would it be to fix the order of execution i

Re: Enforcing order of execution for function arguments

2007-01-10 Thread Ian Lance Taylor
"Chris Jefferson" <[EMAIL PROTECTED]> writes: > One thing which comes up regularly in various C and C++ messageboards > is that statements like "f() + g()" and "a(f(), g())" do not declare > which order f() and g() will be executed in. > > How hard would it be to fix the order of execution in gcc

Re: Enforcing order of execution for function arguments

2007-01-10 Thread Andrew Haley
Chris Jefferson writes: > One thing which comes up regularly in various C and C++ > messageboards is that statements like "f() + g()" and "a(f(), g())" > do not declare which order f() and g() will be executed in. > > How hard would it be to fix the order of execution in gcc/g++? > Could so

Enforcing order of execution for function arguments

2007-01-10 Thread Chris Jefferson
Apologises for the slightly off-topic message. One thing which comes up regularly in various C and C++ messageboards is that statements like "f() + g()" and "a(f(), g())" do not declare which order f() and g() will be executed in. How hard would it be to fix the order of execution in gcc/g++? Co