[PATCH, Fortran] DEC Compatibility: Default missing exponents to 0 with -fdec

Jerry DeLisle jvdelisle@charter.net
Thu Nov 3 17:52:00 GMT 2016


On 10/26/2016 07:14 AM, Fritz Reese wrote:
> All,
>
> Attached is a patch to the GNU Fortran front-end and runtime library
> (libgfortran) which accepts real numbers with missing exponents as if
> '0' was given as the exponent when the compile flag -fdec is given,
> for further compatibility with legacy compilers. By default, GNU
> Fortran will reject real constants such as '9e' or '15.2e'. With the
> patch and -fdec, such numbers are accepted and treated as '9e0' (9) or
> '15.2e0' (15.2), both at compile-time through the front-end and at
> runtime through libgfortran.
>
> For compile-time this is trivial. For runtime, An IOPARM_DT flag bit
> is added to the usual flags to track whether a program was compiled
> with the "default exponent" behavior, which the library can detect at
> runtime for programs individually. No space is required in the
> st_parameter_dt structure, and the behavior should be
> backwards-compatible (by design of the IOPARM structures/flags).
>
> Bootstraps and regtests on x86_64-redhat-linux. OK for trunk?
>

This is OK, thanks.

Jerry



More information about the Fortran mailing list