This is the mail archive of the gcc-patches@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]

[gfortran] PR16404 fix Number 4


This makes us issue a warning/error if a comma appears before the output
item list of a WRITE standard.

Built and tested. I also verified that the error is issued.

- Tobi

2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
	
	PR fortran/16404
	* io.c (match_io): Flag 'WRITE(...), ...' as extension.

Index: io.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/io.c,v
retrieving revision 1.11
diff -u -p -r1.11 io.c
--- io.c        29 Jun 2004 18:55:11 -0000      1.11
+++ io.c        11 Jul 2004 12:58:44 -0000
@@ -2146,8 +2146,12 @@ loop:

 get_io_list:
   /* Optional leading comma (non-standard).  */
-  if (!comma_flag)
-    gfc_match_char (',');
+  if (!comma_flag
+      && gfc_match_char (',') == MATCH_YES
+      && k == M_WRITE
+      && gfc_notify_std (GFC_STD_GNU, "Comma before output item list "
+                        "at %C is an extension") == FAILURE)
+    return MATCH_ERROR;

   io_code = NULL;
   if (gfc_match_eos () != MATCH_YES)


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