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

Jakub Jelinek jakub@redhat.com
Sat Mar 24 09:35:00 GMT 2018


On Fri, Mar 23, 2018 at 05:32:45PM -0400, Fritz Reese wrote:
> Sorry I am a bit late on the discussion, I overlooked this chain of messages...
> 
> > On Tue, Mar 20, 2018 at 12:41:25PM -0600, Jeff Law wrote:
> > Because this is a case where where a compile-time flag needs to affect
> > the runtime, we need to communicate to the runtime that the magic
> > compile-time flag is on.
> >
> > We have two general approaches for this kind of communication.  One is
> > to set a mask within the DT_PARM which gets passed into the runtime at
> > the call site.  The other is to marshall the flags in
> > gfortran_set{args,options} on a global basis.
> 
> My first thought is whether we need to reserve a new bit at all. Since
> allowing a default for zero-width format specifiers doesn't seem
> terribly harmful, perhaps we could lump it into -std=legacy? The
> standard flags are already passed to the runtime, so no additional
> information would be required. I believe this would simplify the
> implementation on top of saving the last few DT_PARM bits.

The default is
warn_std = GFC_STD_LEGACY | GFC_STD_F95_DEL;
allow_std = GFC_STD_*; // all
pedantic = 0;

So if we use e.g. notify_std (..., GFC_STD_LEGACY, ...) for this,
it would not warn at all by default, and would ever warn only if using
-pedantic.  Is that what we want for this extension?

Or shall we just check (warn_std & GFC_STD_LEGACY) != 0, if true,
set fmt->error if width etc. is missing, otherwise use the -1 and later
resolve it to the default?

Any way to deal with the FMT_L missing width inconsistency (libgfortran
under notify_std (..., GFC_STD_GNU, ...) using default length of 1 while
the other compilers all using 2?

	Jakub



More information about the Fortran mailing list