[PATCH, Fortran] Parse FINAL procedure declarations
Daniel Kraft
d@domob.eu
Tue May 27 07:49:00 GMT 2008
Daniel Kraft wrote:
> Hi,
>
> 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.
I'm not sure about how reviewing is going on, but here's a revised
version of the patch/changelog.
What I did change:
* now only SUBROUTINEs can be declared FINAL, corrected tests and code
* -std=f95 now gives notify-std-errors for CONTAINS/FINAL in a derived
type declaration
* I rewrote gfc_resolve_finalizers so that erraneous finalizers are
removed from the list on the spot; I did this because it was not much
effort and I believe it is a cleaner approach, as this removes any risk
of having wrong nodes in the list later where it is already expected
that all are valid; even though an error is output anyway ;)
* -Wsurprising now warns about:
* non-scalar FINALizer other than assumed-shape
* FINAL procedures declared, but no scalar version
Other than this, nothing has been changed (including, what I believe,
the main critical parts like parser/integration of the new things into
existing code).
There was a suggestion to warn also about (non-ELEMENTAL) scalar
FINALizers where no array version is declared, but I believe this can
not be done satisfiably at this point; I believe so because we don't
know for which shapes array versions are needed (and hardcoding
something like "warn if no rank-1 FINALizer is there" is ugly), so what
I plan to do is warning when an actual array is to be finalized for
whose type finalizers exist but not for its rank. This will be done in
the second part of this patch, implementing the actual finalization process.
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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080527/330e7caf/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.changelog
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080527/330e7caf/attachment.ksh>
More information about the Fortran
mailing list