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

--- Comment #2 from Walter Spector <w6ws at earthlink dot net> ---
Having suffered through porting Fortran programs from one compiler to another,
and one system to another, uncountable times over the past 50 years, I am one
who doesn't like "legacy" extensions to be enabled by default.  They are traps
just waiting to be sprung.  So in the rare case where I want specific
extensions, I like options to explicitly turn them on.

It seems that if I compile with -std=legacy, the compiler somehow indicates to
the run-time library to allow the missing commas extension:

$ gfortran -std=legacy -g badfmt.f90
$ ./a.out
hi3
hi3
hi3
hi3
hi3
$

With this in mind, I would suggest issuing a diagnostic at compile time
whenever possible - unless -std=legacy is specified.

In the case of run-time formats, without -std=legacy there isn't a way to check
at compile time.  So perhaps the run-time error message could indicate that it
would work if the code were compiled with -std=legacy.

Reply via email to