GCC beaten by ICC in stupid trig test!
Richard Guenther
rguenth@tat.physik.uni-tuebingen.de
Wed Mar 24 22:19:00 GMT 2004
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.
Browsing through the standard I cannot find anything supporting this.
Can you point me to the right section? You may be reffering to 6.5 (3),
but that is overly vague and doesn't mention grouping by parantheses at
all ("The grouping of operators and operands is specified by the
syntax"). And 6.5.1 (5) seems to be ambiguous, too.
Apart from evaluation order, I only can find phrases weakening control
over FP, like 6.5 paragraphs 5 and 8.
Richard.
More information about the Gcc
mailing list