[Patch/fortran] Add documentation section about implemented F2003 features
Richard E Maine
Richard.Maine@nasa.gov
Tue Aug 2 21:39:00 GMT 2005
On Aug 2, 2005, at 2:15 PM, Janne Blomqvist wrote:
> I also removed the mention of eventual support of Fortran 90. IMHO the
> inability of F95 allocatables to leak memory, as opposed to the F90
> ones, is sufficient reason alone to actively discourage users from
> using F90.
I'm not sure what you mean by that. There is no standard-conforming way
for f90 allocatables to leak memory either. The big problem with f90
allocatables was that they could get an undefined allocation status in
which case it was illegal to ever do anything with them again.
Nonstandard code could do several things, and f90 compilers were
perhaps less likely to catch the problem, but that doesn't sound like
what you are talking about.
More to the point, with the exception of the deleted features (which
aren't related to allocatable and would apply equally well to f77),
there is no way for a user to write code that somehow is exclusively
f90 code and not also f95. The user can write f90 code that doesn't
take full advantage of f95 - that's all.
In particular, there is no way for a user to write f90 code that
somehow depends on the compiler not doing allocatables as specified in
f95. If the user ends up with allocatables that would be undefined in
f90, then either
1. They are never subsequently touched in any way, in which case it
doesn't matter whether or not the compiler does the "right" f95 thing.
or
2. If they are touched, then the code wasn't valid f90 and who knows
what would have happened to it with f90 compilers. I don't think we
need to worry in this context about discouraging users from writing
code that is invalid under whatever version of the standard they are
trying to write to.
For the same reason, I don't know what you mean by "eventual" support
of f90. If you support f95, then you already support f90; nothing
additional is needed. (Well, I suppose there might be cases where f90
mandates diagnostics for what look slike invalid syntax in f90, but is
valid f95, but that's all).
--
Richard Maine | Good judgment comes from experience;
Richard.Maine@nasa.gov | experience comes from bad judgment.
| -- Mark Twain
More information about the Gcc-patches
mailing list