Re: Egcs 1.0.3 & Linux

Chris Wedgwood (chris@cybernet.co.nz)
Tue, 19 May 1998 16:15:39 +1200


> CW> I was under the impression that in the case of equal operator precedence the
> CW> order was defined to be strictly left to right, so in this case it should
> CW> return 2 and never 1.
> CW>

> Problem not with equal operator. Problem is with plus operator. Compiler
> has right to extract value of "a" first, to call f() next and to sum
> extracted value (0) with result of function all (1). Result, of course,
> will be 1.

I perhaps didn't phrase things very clearly. I'm not talking about the
equals operator.

I had always assumed (incorrectly) that when dealing with operators of the
same precedence the order was to be taken as left to right. i.e. a+b+c+d
should always be treated as ((a+b)+c)+d, and a*b*c would be (a*b)*c.

-Chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu