[comp.lang.fortran] question about constants in FORTRAN

hirchert@uxe.cso.uiuc.edu (04/25/88)

>The next most helpful thing would be for the compiler to choose an
>implementation strategy that avoided truly bizarre resukts.  In this
>case, what I would do is create at each call of "sub", a temporary
>variable initialised with the value zero, and pass that address as
>the parameter.  Then there is no way an illegal redefinition within
>sub can change the value of a subsequent occurrence of the literal
>zero.  I submit that a compiler writer who cared for the users of
>his work would at least go this far.

If a compiler writer cares about me as a user, he won't use this technique
to slow down my correct programs, just so your incorrect programs don't get
bizarre results.  (Perhaps, this should be a compiler option.  Then I could
turn it on for programs that I suspect of doing such illegal things, but I
could still avoid the performance hit on programs I know to be correct.)

>Robert Firth

Kurt W. Hirchert    National Center for Supercomputing Applications