https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90374

--- Comment #13 from Thomas Henlich <thenlich+gccbug at gmail dot com> ---
Just a minor issue: I think that the sense of the message arguments in calls to
gfc_notify_std() should be inverted - they should describe the feature as
supported in the correct standard, and not as an error message.

For example:

gfc_notify_std (GFC_STD_F2018, "positive width required at %L", &format_locus)

should read
gfc_notify_std (GFC_STD_F2018, "zero width at %L", &format_locus)

It just seems counter-intuitive to read a message like:
gfortran -std=f2008 -o test-f2018.exe test-f2018.f90

    2 |     write(*, "(e0.10e2)")  0.00314_4
      |                1
Error: Fortran 2018: positive width required at (1)

because the user is trying to access a feature (zero width) of Fortran 2018,
but that fails. The current message implies that "Fortran 2018 requires a
positive width" which is exactly the opposite, this is confusing.

Reply via email to