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: GCC beaten by ICC in stupid trig test!


On Wed, Mar 24, 2004 at 07:14:43PM +0000, Joseph S. Myers wrote:
> Evaluation order (sequence points) has nothing to do with associativity.  
> The C syntax specifies that a+b+c means exactly (a+b)+c - but in both 
> cases, a, b and c can be evaluated in any order.

So: does this mean that a conforming C compiler is not permitted, for

double add(double a, double b, double c) { return a + b + c;}

to generate the equivalent of

   double t1 = a + c;
   return t1 + b;

as a Fortran compiler is?


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