diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-29 19:28:48 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-29 19:28:48 +0000 |
commit | 31f7726b33425028a8cba4fcb7e6c277f0018331 (patch) | |
tree | f7924c960ec2b58e7093bec385ee89581d4a8dc3 /libgfortran/io | |
parent | 81ad3bc785c8a6366481340a21b5305e0bad6939 (diff) | |
download | gcc-31f7726b33425028a8cba4fcb7e6c277f0018331.tar.gz |
2006-05-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/27634
* io/format.c (parse_format_list): Allow missing period in format only
if -std=legacy.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114212 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/format.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index 96d7019eedc..5af5c6e8bde 100644 --- a/libgfortran/io/format.c +++ b/libgfortran/io/format.c @@ -725,8 +725,16 @@ parse_format_list (st_parameter_dt *dtp) t = format_lex (fmt); if (t != FMT_PERIOD) { - fmt->error = period_required; - goto finished; + /* We treat a missing decimal descriptor as 0. Note: This is only + allowed if -std=legacy, otherwise an error occurs. */ + if (compile_options.warn_std != 0) + { + fmt->error = period_required; + goto finished; + } + fmt->saved_token = t; + tail->u.real.d = 0; + break; } t = format_lex (fmt); |