order of evaluation
john at viper.UUCP
john at viper.UUCP
Wed Mar 4 15:00:57 AEST 1987
I made an incorrect statement a few days ago in this newsgroup about the
order of evaluation of a series of additions where parens were included.
The message I was disagreeing with stated that the parens have no effect
on the structure of the evaluation tree generated.
Since then, I've received a few messages pointing out references in K&R
which explicitly state that the elements in a series of additions (or
multiplications) may freely be reordered to occur in any order by the
compiler.
I sit corrected, but I still feel that the standard should have rules
which will allow a programmer to -know- the exact order of evaluation for
any equation. I know this is not likely for the sole reason that there
are too many different compilers already existing that do the ordering in
far too many different ways.... I still feel that this is a significant
failing in the language definition and would like to see a change.
---
John Stanley (john at viper.UUCP)
Software Consultant - DynaSoft Systems
UUCP: ...{amdahl,ihnp4,rutgers}!{meccts,dayton}!viper!john
More information about the Comp.lang.c
mailing list