This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]