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!allegra!bellcore!decvax!wanginst!ucadmus!harvard!seismo!brl-tgr!tgr!MRC@SU-SCORE.ARPA From: Mark CrispinNewsgroups: net.unix-wizards Subject: Re: smart compilers Message-ID: <7131@brl-tgr.ARPA> Date: Tue, 8-Jan-85 23:27:59 EST Article-I.D.: brl-tgr.7131 Posted: Tue Jan 8 23:27:59 1985 Date-Received: Sat, 12-Jan-85 00:35:15 EST Sender: news@brl-tgr.ARPA Organization: Ballistic Research Lab Lines: 17 The issue is NOT whether the compiler can avoid the problem. The issue is that the Fortran 77 standard disallows doing that. If you do something which is invalid Fortran, you shouldn't be surprised if strange things happen. Some compilers do indeed generate code which prevents constants from being changed (and checks array bounds, etc.). However, such compilers are called "debugging compilers" because the object code is slower. A LOT slower. Let's not forget the bad old days when we used to write code which deliberately violated Fortran to do useful things (especially out-of-bounds array references!!). I really find it surprising that this issue seriously comes up on this list. C will bite you back MUCH WORSE than Fortran will if you write invalid (albeit syntactically valid) C programs. -------