This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH, Fortran] Parse FINAL procedure declarations
Daniel Kraft wrote:
a) You miss a check whether the finalization procedure is a
subroutine. Currently also functions are accepted.
Should there be any? I thought it could be both (and for functions
the return would just be ignored or something like that).
Fortran is not C and makes a real distinction between functions and
subroutines. It is not possible to call a function without
assigning/using the return value somehow. Additionally, 4.5.5.
explicitly states:
"The FINAL keyword specifies a list of final subroutines."
Note the word "subroutines" -- and not "procedures" which denotes both
subroutines and functions.
Tobias