On Tue, Apr 26, 2011 at 19:52, Steve Kargl
<[email protected]> wrote:
> Yes. I've implemented in the revised patch, and I've
> updated the docs.
>
> 2011-04-26 Steven G. Kargl <[email protected]>
>
> PR fortran/48720
> * gfortran.texi: Document the 'Q' exponent-letter extension.
> * invoke.texi: Document -Wreal-q-constant.
> * lang.opt: Add -Wreal-q-constant option.
> * gfortran.h: Add warn_real_q_constant to option struct.
> * primary.c (match_real_constant): Use it. Accept 'Q' as
> exponent-letter for REAL(16) real-literal-constant with a
> fallback to REAL(10) or error if REAL(10) is not available.
> * options.c (gfc_init_options, set_Wall) Set it.
> (gfc_handle_option): Handle new option.
--- primary.c (revision 172974)
+++ primary.c (working copy)
@@ -616,6 +627,29 @@ done:
kind = gfc_default_double_kind;
break;
+ case 'q':
+ if (kind != -2)
+ {
+ gfc_error ("Real number at %C has a 'q' exponent and an explicit "
+ "kind");
+ goto cleanup;
+ }
+
+ /* The maximum possible real kind type parameter is 16. First, try
+ that for the kind, then fallback to trying kind=10 (Intel 80 bit)
+ extended precision. If neither value works, just given up. */
s/given/give/
> OK?
Ok. Thanks for fixing this!
--
Janne Blomqvist