Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdcrdcf!hplabs!hao!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn) Newsgroups: net.unix-wizards Subject: Re: smart compilers Message-ID: <6521@brl-tgr.ARPA> Date: Sat, 8-Dec-84 23:31:27 EST Article-I.D.: brl-tgr.6521 Posted: Sat Dec 8 23:31:27 1984 Date-Received: Tue, 11-Dec-84 02:43:45 EST References: <783@enea.UUCP> <479@sftig.UUCP> Organization: Ballistic Research Lab Lines: 15 > 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.