Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site opus.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!hao!nbires!opus!rcd From: rcd@opus.UUCP (Dick Dunn) Newsgroups: net.lang Subject: Re: Smart compilers Message-ID: <1047@opus.UUCP> Date: Wed, 23-Jan-85 01:40:58 EST Article-I.D.: opus.1047 Posted: Wed Jan 23 01:40:58 1985 Date-Received: Fri, 25-Jan-85 07:57:53 EST References: <206@cheviot.UUCP> <409@petsd.UUCP> <236@cheviot.UUCP> Organization: NBI,Inc, Boulder CO Lines: 39 > It would seem from other discussions that examples like mine are banned > by the small print of the language standard. > > The problem is that such deviations are very hard if not impossible to > detect by a conventional compiler which is therefore at liberty to do > what it likes with "non-standard" code. That may not be the sum of the problem. A lot rests on how much "small print" exists in the language standard. One would like the union of {fine points which ARE understood by the average programmer} with {fine points detected by the compiler} to cover all of the nasty fine points. > Perhaps because I am a European (:-) I worry about this. If it is possible > to write a non-standard program by accident which is incorrectly optimised > by a compiler which conforms to the standard, then we have a potentially > dangerous situation on our hands. Suppose this program is let loose on some > application where lives are at risk? Even if the application is not that > critical, a lot of time and money could be wasted tracking down something > which is not really a compiler bug. [I want to pick nits and say that if the program is non-standard, it is not the compiler which is doing "incorrect optimization" but the programmer who is doing "incorrect programming".] It seems to be far too difficult to create a real language, useful for writing significant programs, which has no dark corners. > It would presumably be possible to write something like "lint" only more so > which crawled all over a large program looking for deviations from the > standard that an ordinary compiler would have neither the time nor the > inclination to discover. But if it's not part of the compiler, it is much less likely to be used, particularly if it's as noisy as lint. Moreover, if it's more thorough than lint, it will probably be even noisier. Finally, if the compiler doesn't have the time (and well it might not), that speaks poorly of the chance that people will take the extra time to run it. -- Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086 ...Keep your day job 'til your night job pays.