(j3.2006) types with finalizers defined in finalizer
Robert Corbett
Robert.Corbett
Fri Aug 8 02:24:44 EDT 2008
The following module appears to be standard-conforming
MODULE MOD
CONTAINS
SUBROUTINE FINAL(X)
TYPE T
INTEGER I
CONTAINS
FINAL FINAL
END TYPE
TYPE(T) :: X
END SUBROUTINE
END
This is the only instance of which I am aware that allows
a derived-type with a finalizer to be declared in a
context other than the specification part of a module.
It requires extra work on the part of the compiler to
support a feature that is worthless. Did I miss a
prohibition in the standard? Does anyone think there is
a reason to allow such code in a standard-conforming
program? If so, what is that reason?
Bob Corbett
More information about the J3
mailing list