smart compilers

rbbb at RICE.ARPA rbbb at RICE.ARPA
Mon Dec 17 13:36:02 AEST 1984


> Compilers that optimize code can break programs regardless of what 
> language that code is written in.  Optimizing compilers are very useful
> as long as the optimization is optional (or at least can be turned
> off when the code involved may be sensitive to optimization).

I must disagree with such a general statement.  There are compilers that
claim to "optimize", and that do break code, but (especially nowadays)
compiler writers go to great pains to ensure that this is not the case,
and they DO provide ways for the programmer to inform the compiler that
mystical things are happening (e.g, "volatile" declaration for variables
that may be modified asynchronously (this for FORTRAN!!)).  An optimizing
compiler that breaks code is buggy, and should be reported as such (rather
than tolerated: "Oh, those optimizing compilers, such rascally programs.
Can't expect an easy time if you want your code to run fast.").  Don't buy
that lie.  Real compilers DO exist.

drc



More information about the Comp.unix.wizards mailing list