]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Adjust handling of optional comma in FORMAT.
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 28 May 2025 14:56:12 +0000 (07:56 -0700)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 28 May 2025 18:13:21 +0000 (11:13 -0700)
commite2bf0b3910de7e65363435f0a7fa606e2448a677
tree843c0d2476fe1f3469fa32978ce75182d885d1d1
parente8fdd55ec907496ff3c80fed55d8da3ddbdc1a2b
Fortran: Adjust handling of optional comma in FORMAT.

This change adjusts the error messages for optional commas
in format strings to give a warning at compile time unless
-std=legacy is used. This is more consistant with the
runtime library. A missing comma separator should not be
encouraged as it is non-standard fortran.

PR fortran/119586

gcc/fortran/ChangeLog:

* io.cc: Set missing comma error checks to STD_STD_LEGACY.

gcc/testsuite/ChangeLog:

* gfortran.dg/comma_format_extension_1.f: Update dg-options to
"-std=legacy".
* gfortran.dg/comma_format_extension_3.f: Likewise.
* gfortran.dg/continuation_13.f90: Likewise.
gcc/fortran/io.cc
gcc/testsuite/gfortran.dg/comma_format_extension_1.f
gcc/testsuite/gfortran.dg/comma_format_extension_3.f
gcc/testsuite/gfortran.dg/continuation_13.f90