diff options
author | Jim MacArthur <jim.macarthur@codethink.co.uk> | 2019-06-19 03:02:21 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2019-06-19 03:02:21 +0000 |
commit | 17f62b7e1fef0a04c738419b0108eeb89f6b7463 (patch) | |
tree | ff00dffb7f13addcdaa0121629e4649ffdef0fce /gcc/fortran/io.c | |
parent | eb54b267a168b87d38d6ea89dcb57b355b0d1b35 (diff) | |
download | gcc-17f62b7e1fef0a04c738419b0108eeb89f6b7463.zip gcc-17f62b7e1fef0a04c738419b0108eeb89f6b7463.tar.gz gcc-17f62b7e1fef0a04c738419b0108eeb89f6b7463.tar.bz2 |
re PR fortran/89103 (Allow blank format items in format strings)
2019-06-19 Jim MacArthur <jim.macarthur@codethink.co.uk>
Mark Eggleston <mark.eggleston@codethink.com>
PR fortran/89103
* gfortran.texi: Add -fdec-blank-format-item
* invoke.texi: Add option to list of options.
* invoke.texi: Add to section on Commas in FORMAT specifications.
* io.c (check_format): At FMT_RPAREN goto finished if
-fdec-blank-format-item otherwise set error string.
* lang.opt: Add new option.
* options.c (set_dec_flags): Add SET_BITFLAG for
flag_dec_format_defaults.
* gfortran.dg/dec_format_empty_item_1.f: New test.
* gfortran.dg/dec_format_empty_item_2.f: New test.
* gfortran.dg/dec_format_empty_item_3.f: New test.
Co-Authored-By: Mark Eggleston <mark.eggleston@codethink.com>
From-SVN: r272467
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r-- | gcc/fortran/io.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 776cdbf..425c2b8 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -762,6 +762,15 @@ format_item_1: error = unexpected_end; goto syntax; + case FMT_RPAREN: + if (flag_dec_blank_format_item) + goto finished; + else + { + error = G_("Missing item in format string at %L"); + goto syntax; + } + default: error = unexpected_element; goto syntax; |