Re: [BUG] Bad #define, nonportable C, missing {}

Neil Booth (neil@daikokuya.demon.co.uk)
Wed, 21 Nov 2001 18:23:23 +0000


Jan Hudec wrote:-

> AFAIK here the order *IS* defined. + operator is evaluated left to right
> unless operands are known not to have side-efects (in which case it doesn't
> matter). Functions are considered not having side-efects iff they are defined
> with constant atribute.

Nope, the order of evaluation of arithmetic operands is undefined, and is
often different depending upon the optimization setting.

Note that this is a totally separate issue to both precedence and
associativity.

Neil.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/