diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2006-05-29 19:28:48 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2006-05-29 19:28:48 +0000 |
commit | a7a8dddd9946fcdba42bc4a65956c8c575a36db5 (patch) | |
tree | f7924c960ec2b58e7093bec385ee89581d4a8dc3 | |
parent | a64a81baf6ef02cd3d474d5eb20a1d28a45f7290 (diff) | |
download | gcc-a7a8dddd9946fcdba42bc4a65956c8c575a36db5.zip gcc-a7a8dddd9946fcdba42bc4a65956c8c575a36db5.tar.gz gcc-a7a8dddd9946fcdba42bc4a65956c8c575a36db5.tar.bz2 |
re PR fortran/27634 (formatted reading/writing: real format without dot)
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.
From-SVN: r114212
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/format.c | 12 |
2 files changed, 16 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 50ebaf2..3ecabcd 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +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. + 2006-05-28 Thomas Koenig <Thomas.Koenig@online.de> * intrinsics/string_intrinsics.c (compare_string): diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index 96d7019..5af5c6e 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); |