smart compilers

Mark Crispin MRC at SU-SCORE.ARPA
Wed Jan 9 14:27:59 AEST 1985


     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.
-------



More information about the Comp.unix.wizards mailing list