This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/36725] g0 edit descriptor: Missing compile-time checking for invalid g0.d



------- Comment #1 from burnus at gcc dot gnu dot org  2008-07-04 08:44 -------
Index: gcc/fortran/io.c
===================================================================
--- gcc/fortran/io.c    (Revision 137451)
+++ gcc/fortran/io.c    (Arbeitskopie)
@@ -694,9 +694,15 @@ data_desc:
              error = zero_width;
              goto syntax;
            }
-         else
-           return gfc_notify_std (GFC_STD_F2008, "Fortran F2008: 'G0' in "
-                                  "format at %C");
+         u = format_lex ();
+         if (u == FMT_ERROR)
+           goto fail;
+         if (u == FMT_PERIOD)
+           gfc_error_now ("For G0 specifying d (G0.d) is not allowed at %C");
+
+         saved_token = u;
+         return gfc_notify_std (GFC_STD_F2008, "Fortran F2008: 'G0' in "
+                                "format at %C");
        }

       if (u == FMT_ERROR)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36725


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]