Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!henry
From: henry@utzoo.UUCP (Henry Spencer)
Newsgroups: net.unix-wizards
Subject: Re: smart compilers
Message-ID: <4747@utzoo.UUCP>
Date: Fri, 7-Dec-84 19:48:29 EST
Article-I.D.: utzoo.4747
Posted: Fri Dec  7 19:48:29 1984
Date-Received: Fri, 7-Dec-84 19:48:29 EST
References: <783@enea.UUCP>, <479@sftig.UUCP>
Organization: U of Toronto Zoology
Lines: 14

> ...  I prefer a compiler to do the expected -- what
> I told it to do.  These kinds of 'optimizations' can make programming a pain
> in the neck.  When it comes to programming, I prefer to be the one that makes
> the mistakes ...

The problem is that such "obviously wrong" optimizations as deleting entire
loops completely may be a side effect of complex combinations of different
optimizations, where each optimization in itself is eminently reasonable.
The solution is not dumb compilers, but compilers that can be told what to
do and what not to do.  The addition of "volatile" to the ANSI C draft is
a major example.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry