Desire to allocate bit in DT_PARM bitmask for DEC FORMAT compatibility purposes

Jakub Jelinek jakub@redhat.com
Tue Mar 27 09:14:00 GMT 2018


On Mon, Mar 26, 2018 at 03:03:11PM -0600, Jeff Law wrote:
> On 03/26/2018 01:42 AM, Jakub Jelinek wrote:
> > On Sun, Mar 25, 2018 at 08:44:41PM -0700, Steve Kargl wrote:
> >> Now that you mention it, -std=dec would prevent a user from
> >> specifically requesting, say, only Fortran 95 with DEC
> >> extensions (i.e, -std=f95 -fdec).
> >>
> >> So, to prevent a bikeshed and micro-engineering, I think you
> >> should go with using bit 28 to comunicate with the runtime
> >> and put everything under -fdec in the FE.
> > 
> > In that case, we would have two bits that are always set based on flag_dec
> > in the compiler.
> Steve might have been using -fdec generically -- there's a -fdec as well
> as various sub-options.

There is, but e.g. the default exponent stuff is guarded solely by -fdec, not by
some sub-option.  If the default width would be also just -fdec, then having
two bits that do the same thing would be a waste of bits.

That said, I don't care that much, there are 3 roughly equivalent ways to
propagate this info (this bit 27, bit 28 and GFC_STD_DEC_EXT on
allow_std/warn_std), let the libgfortran maintainers choose.

The patch I've posted with s/IOPARM_DT_DEC_EXP/IOPARM_DT_DEC_EXT/ to fix
one typo I've made passed bootstrap/regtest on x86_64-linux and i686-linux.

	Jakub



More information about the Fortran mailing list