[Patch, fortran] PR30887 and PR30888 - overdone constraints on %VAL
Tobias Burnus
burnus@net-b.de
Thu Feb 22 21:43:00 GMT 2007
Hi,
I have an implementation question. The previous version used always the
default_kind and variables which had a smaller kind were automatically
promoted to the default_kind.
The implementation of this patch always keeps the kind when using %VAL().
However, an alternative implementation would be to use max(default_kind,
expression_kind).
I think keeping the kind sounds like the better choice, but I don't know
what programmers assume.
(As integer(2) and integer(1) are rarely used, this essentially only
happens with integer(4) and real(4) together with -fdefault-real-8,
-fdefault-integer-8.)
Tobias
More information about the Fortran
mailing list