On Mon, Apr 25, 2011 at 21:42, Steve Kargl
<s...@troutmask.apl.washington.edu> wrote:
> Historically, gfortran has accepted real-literal-constants
> of the form 1.23Q45 as single precision values.  Many commercial
> compilers (dating back years) have used the 'Q' exponent-letter
> to mean quadruple precision.  With the addition of software
> support for REAL(16) on i386 and x86_64 targets, I anticipate
> an increase in use of the 'Q' form.  The attached patch does
> the following:
>
> 1) If REAL(16) is available, a real-literal-constant with a 'Q'
>   exponent-letter is accepted as a REAL(16) entity.
>
> 2) If REAL(16) is not available but REAL(10) is, then the constant
>   is accepted as a REAL(10).
>
> 3) If neither REAL(16) nor REAL(10) is available, an error is
>   issued.
>
> 4) An error is issued if one uses -std=f95, f2003, or f2008; otherwise
>   a warning will be issued.  The only way to disable the warning is
>   to either fix the code to conform to the Fortran standard or use
>   -w to disable warnings.

Hmm, I'd prefer if the warning was issued only with -Wsomething which
would be included in -Wall. But I suppose this can be done as a
follow-up patch.

> 5) If the constant has the form 1.23Q45_16 (ie., a integer kind
>   suffix is appended to the value), then an error is issued.  This
>   is similar to the requirement that 1.23D45_xyz violated the
>   Fortran Standard.
>
> The attached patch has been built and regression
> tested on x86_64-*-freebsd.  There were no regression
> with the patch.  OK for trunk (and 4.6 branch after
> testing)?
>
> 2011-04-25  Steven G. Kargl  <ka...@gcc.gnu.org.>
>
>        PR fortran/48720
>        * gfortran.texi: Document the 'Q' exponent-letter extension.

IMHO you can leave out the sentences " Prior to version 4.6.1,
+GNU Fortran silently accepted @code{Q} as an alias for the single
+precision exponent-letter @code{E}.  With the introduction of software
+support for @code{REAL(16)} (i.e., quadruple precision) on i386 and
+x86_64 targets, the interpretation of @code{Q} has been updated to
+mean a @code{REAL(16)} real-literal-constant.  This aligns GNU Fortran
+with many commercially available compilers. ". In general we don't
document in which particular version a certain bug/regression/feature
was fixed/implemented as that would eventually just clutter up the
manual with

>        * primary.c (match_real_constant):  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.


Otherwise Ok. Thanks for the patch.



-- 
Janne Blomqvist

Reply via email to