aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2019-12-01 22:29:43 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2019-12-01 22:29:43 +0000
commitb61f12e6bf5412a09b2a6127ea86b6b4bfac50b2 (patch)
tree8ab8e85bdaf89d3bbd3a82347a5afe1b323e1149
parent61363129642c89e90b694ee9b2c0e1b7b5bd6d66 (diff)
2019-12-01 Jerry DeLisle <jvdelisle@gcc.ngu.org>
PR fortran/90374 * io/format.c (parse_format_list): Add braces to disambiguate conditional. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278886 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/format.c24
2 files changed, 19 insertions, 11 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 74e36acd1d9..ac925cc8dc4 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2019-12-01 Jerry DeLisle <jvdelisle@gcc.ngu.org>
+
+ PR fortran/90374
+ * io/format.c (parse_format_list): Add braces to disambiguate
+ conditional.
+
2019-11-28 Jerry DeLisle <jvdelisle@gcc.ngu.org>
PR fortran/90374
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c
index dd448c83e87..0b23721c055 100644
--- a/libgfortran/io/format.c
+++ b/libgfortran/io/format.c
@@ -1027,17 +1027,19 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
{
t = format_lex (fmt);
if (t != FMT_POSINT)
- if (t == FMT_ZERO)
- {
- notify_std (&dtp->common, GFC_STD_F2018,
- "Positive exponent width required");
- }
- else
- {
- fmt->error = "Positive exponent width required in "
- "format string at %L";
- goto finished;
- }
+ {
+ if (t == FMT_ZERO)
+ {
+ notify_std (&dtp->common, GFC_STD_F2018,
+ "Positive exponent width required");
+ }
+ else
+ {
+ fmt->error = "Positive exponent width required in "
+ "format string at %L";
+ goto finished;
+ }
+ }
tail->u.real.e = fmt->value;
}