]> 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>
Mon, 2 Jun 2025 01:13:24 +0000 (18:13 -0700)
commit4856affe9e08a3562792d6cde217cd06c1ef93da
treefcc8495fe94dcf8dea3de48c39d6e9eb6b0d8e0e
parent9e734259dc4b15982727697d88d59170e71de53d
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/119856

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.

(cherry picked from commit e2bf0b3910de7e65363435f0a7fa606e2448a677)
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