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
- From: Daniel Kraft <d at domob dot eu>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Fortran List <fortran at gcc dot gnu dot org>
- Date: Sat, 24 May 2008 01:06:20 +0200
- Subject: Re: [PATCH, Fortran] Parse FINAL procedure declarations
- References: <4835E92F.3060603@domob.eu> <48372EA1.5090605@net-b.de>
Tobias Burnus wrote:
Hi Daniel,
Daniel Kraft wrote:
this is a first patch including ChangeLog for implementing parsing and
resolution of Fortran 2003 FINAL procedures; when this is completed,
I'll work on actually finalizing expressions.
Some comments:
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).
b) The following program is accepted with -std=f95, but it should be
rejected:
module m
type t
integer :: i
contains ! Fortran 2003: contains
FINAL :: a ! Fortran 2003: FINAL
end type t
contains
function a(x) ! wrong: Function
type(t) :: x
end function a
end module m
Forgot about this, should be straight forward.
Thanks!
Daniel
--
Done: Bar-Sam-Val-Wiz, Dwa-Elf-Hum-Orc, Cha-Law, Fem-Mal
Underway: Ran-Gno-Neu-Fem
To go: Arc-Cav-Hea-Kni-Mon-Pri-Rog-Tou