smart compilers

Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Sun Dec 9 14:31:27 AEST 1984


> When it comes to programming, I prefer to be the one that makes
> the mistakes and not find out that a compiler cannot generate the code I
> want it to generate.

I empathize with Paul's position.  However, the whole point of a compiler
is to keep you from having to worry about code generation.  Practically
all production compilers, including PCC, rearrange the initial "dumb"
parse tree and generated code to produce logically equivalent but faster
and smaller code.  Most often this is a desirable service.

It is quite true that this kind of optimization can get in the way when
one is trying to twiddle device registers and do other similar things
beyond the ken of the compiler.  That is why the "volatile" specification
(which protects such code against optimization) being proposed for ANSI
standard C is important.



More information about the Comp.unix.wizards mailing list