On Sun, May 20, 2018 at 07:28:49PM +0200, Janus Weil wrote:
> 
> > the attached patch deals with the fact that the Fortran 2018 standard
> > marks two features as "deleted" (i.e. no longer supported), namely
> > arithmetic IFs and nonblock DO constructs. Both have been obsolescent
> > since the 90s (and have been warned about by gfortran with appropriate
> > flags).
> >
> > Here's what the patch does:
> > 1) It rejects those features with -std=f2018, giving a hard error.
> > 2) It gives a warning with default flags (previously this happened
> > only with -std=f2008 etc, but not with -std=gnu).
> 
> here is a slightly updated version of the patch. While the previous
> one had to duplicate every invocation of gfc_notify_std like this:
> 
> if (!gfc_notify_std (GFC_STD_F2018_DEL, ...)) ...
> if (!gfc_notify_std (GFC_STD_F95_OBS, ...)) ...
> 
> the new version extends gfc_notify_std, such that it works not only
> with a single GFC_STD_* flag, but can handle combinations of those.
> For such a situation, where a single feature can belong to several
> GFC_STD_* classes, one potentially needs to throw different error or
> warning messages, depending on the -std= option. The invocation of
> gfc_notify_std then simplifies to:
> 
> if (!gfc_notify_std (GFC_STD_F95_OBS | GFC_STD_F2018_DEL, ...)) ...
> 
> The patch still regtests cleanly. Ok for trunk?

Patch looks good to me.  The only thing that worries me is 
whether the patch will cause the SPEC benchmark to throw
an error or warning that it did not before.  As I don't have
SPEC benchmark and it cost $$$, I'm not going to let it 
bother too much.

> Btw, with the arrival of the F2018 standard, I wonder whether it
> actually makes sense to keep the option -std=f2008ts, or to remove it
> in favor of -std=f2018, since the two Technical Specifications covered
> by this flag are now part of F2018 (and pretty much the main part!).
> Any opinions on this?

I think that f2008ts can go away.  We may need to do this
in two step as some users may have f2008ts hardcoded in
Makefiles.  Probably, issue warning for -std=2008ts and
map it to -std=2018 for a brief period (3 to 6 months?)
and then finally remove it.

-- 
steve

Reply via email to