re PR libfortran/90374 (Fortran 2018: Support d0.d, e0.d, es0.d, en0.d, g0.d and...
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 1 Dec 2019 22:29:43 +0000 (22:29 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 1 Dec 2019 22:29:43 +0000 (22:29 +0000)
2019-12-01  Jerry DeLisle  <jvdelisle@gcc.ngu.org>

PR fortran/90374
* io/format.c (parse_format_list): Add braces to disambiguate
conditional.

From-SVN: r278886

libgfortran/ChangeLog
libgfortran/io/format.c

index 74e36acd1d9bdee2a45b706519d114ca202944f7..ac925cc8dc416a7b15edbc195991763482ad2d94 100644 (file)
@@ -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
index dd448c83e87134250d660ab525013e92ee249e1d..0b23721c05533b8b70fe8ef50116e776574f2226 100644 (file)
@@ -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;
        }