GCC beaten by ICC in stupid trig test!

Joe Buck Joe.Buck@synopsys.COM
Wed Mar 24 21:38:00 GMT 2004


On Wed, Mar 24, 2004 at 07:14:43PM +0000, Joseph S. Myers wrote:
> On Wed, 24 Mar 2004, Paul Koning wrote:
> 
> > I don't have a C standard, but my copy of Harbison & Steele says what
> > I expected about parentheses: "Parentheses do not necessarily force a
> > particular evaluation order".  
> 
> 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.

Exactly; evaluation order is completely separate from the question at
hand.  Evaluation order means that if a, b, and c are actually
expressions, these expressions can be evaluated in any order.  For
associativity, the question is whether a must be added to b, and the
result added to c, or if it is permissible to combine the operands in a
different way.




More information about the Gcc mailing list