re PR fortran/16404 (should reject invalid code with -pedantic -std=f95 ? (x8))
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
Sun, 11 Jul 2004 13:35:33 +0000 (15:35 +0200)
committerTobias Schlüter <tobi@gcc.gnu.org>
Sun, 11 Jul 2004 13:35:33 +0000 (15:35 +0200)
PR fortran/16404
* io.c (match_io): Flag 'WRITE(...), ...' as extension.

From-SVN: r84510

gcc/fortran/ChangeLog
gcc/fortran/io.c

index 0c784140d57f4e73b32d008531503a432bed6aad..4ed7899f6e40a092e294d58ff935fe9bc8a514ff 100644 (file)
@@ -4,6 +4,9 @@
        * module.c (gfc_dump_module, gfc_use_module): Print locus
        when opening of module file fails.
 
+       PR fortran/16404
+       * io.c (match_io): Flag 'WRITE(...), ...' as extension.
+       
 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
 
        * f95-lang.c (set_block): Remove.
index 631197258a0485e066147828ce13a02f26001a33..5db519a02f84bbc62dba6ddb6cd1a6152c319575 100644 (file)
@@ -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)