Messages in this thread | | | Date | Wed, 21 Nov 2001 14:40:34 +0100 | From | Jan Hudec <> | Subject | Re: [BUG] Bad #define, nonportable C, missing {} |
| |
> On Wed, Nov 21, 2001 at 12:40:17PM +0000, vda wrote: > If you wanna do this type of cleanup, you can take it one step forward; > remember that the order of evaluation of foo and bar doesn't have to be > {foo => bar} so it can be {bar => foo} I hope gcc's behaviour doesn't > change under our feet. > > a = foo (i) + bar (j); > > .. sprinkle some pointer arithmetic over there for fun ;)
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.
-------------------------------------------------------------------------------- - Jan Hudec `Bulb' <bulb@ucw.cz> - 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/
| |