F90-related question
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue Dec 10 17:02:00 GMT 2013
On Tue, Dec 10, 2013 at 05:31:10PM +0100, Janus Weil wrote:
>
> Sorry, I don't follow what you're trying to say. The behavior changed
> between 4.5 and 4.6 due to the addition of REAL(16), fine. But how is
> that related to the sentence I want to remove? The fact that
> -fdefault-real-8 also promotes DOUBLE PRECISION to REAL(16) is still
> in there.
>
Yes, of course, you're correct. My original text from 9 years ago
was
197 @cindex option, -fdefault-real-8
198 @cindex -fdefault-real-8, option
199 @item -fdefault-real-8
200 Set the default real type to an 8 byte wide type.
201 Do nothing if this is already the default.
This looks like an attempt to explain what the code says. Looking at
the diff, I had
+ /* Choose the default double kind. If -fdefault-real and -fdefault-double
+ are specified, we use kind=8, if it's available. If -fdefault-real is
+ specified without -fdefault-double, we use kind=16, if it's available.
+ Otherwise we do not change anything. */
+ if (gfc_option.flag_default_double && !gfc_option.flag_default_real)
+ fatal_error ("Use of -fdefault-double-8 requires -fdefault-real-8");
+
+ if (gfc_option.flag_default_real && gfc_option.flag_default_double && saw_r8)
+ gfc_default_double_kind = 8;
+ else if (gfc_option.flag_default_real && saw_r16)
When Daniel added the additional text to the manual, we probably
should have reaped that sentence. So, yes, it can be removed.
--
Steve
More information about the Fortran
mailing list