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!burl!ulysses!mhuxr!ihnp4!zehntel!tektronix!hplabs!hao!seismo!brl-tgr!tgr!rbbb@RICE.ARPA From: rbbb@RICE.ARPA Newsgroups: net.unix-wizards Subject: smart compilers Message-ID: <6601@brl-tgr.ARPA> Date: Sun, 16-Dec-84 22:36:02 EST Article-I.D.: brl-tgr.6601 Posted: Sun Dec 16 22:36:02 1984 Date-Received: Wed, 19-Dec-84 00:37:23 EST Sender: news@brl-tgr.ARPA Organization: Ballistic Research Lab Lines: 17 > 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