]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/28335 (flush() / write() statement on closed units - error?)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 31 Jul 2006 00:15:08 +0000 (00:15 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 31 Jul 2006 00:15:08 +0000 (00:15 +0000)
2006-07-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/28335
* close.c (st_close): Revert previous patch and add comment.
* file_position.c (st_flush): Revert previous patch and add comment.

From-SVN: r115829

libgfortran/ChangeLog
libgfortran/io/close.c
libgfortran/io/file_pos.c

index 2e904d7589a7d94db0a54d5f35cfc1bd0d1ff22f..cb4b0e39bb4ccf5ede7b5d6b94f368b761c7f77f 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/28335
+       * close.c (st_close): Revert previous patch and add comment.
+       * file_position.c (st_flush): Revert previous patch and add comment.
+
 2006-07-30  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        * intrinsics/date_and_time.c: Add functions for GMTIME and LTIME.
index b6766ff37d51e84d383d7df450bd349acc0be9f5..66ea6c3fb69fa1316b279469ce4db9378cfa1cac 100644 (file)
@@ -102,8 +102,7 @@ st_close (st_parameter_close *clp)
         unlink (path);
 #endif
     }
-  else
-    generate_error (&clp->common, ERROR_BAD_OPTION,
-                           "Can't find specified UNIT in CLOSE");
+
+  /* CLOSE on unconnected unit is legal and a no-op: F95 std., 9.3.5. */ 
   library_end ();
 }
index 7a71ecef63b7dba675c909f5ae94dac238c156b1..c306d6e8d73ef03631921bf325f902c25d0ad2ea 100644 (file)
@@ -340,9 +340,7 @@ st_flush (st_parameter_filepos *fpp)
       flush (u->s);
       unlock_unit (u);
     }
-  else
-    generate_error (&fpp->common, ERROR_BAD_OPTION,
-                       "Can't find specified UNIT in FLUSH");
 
+  /* CLOSE on unconnected unit is legal and a no-op: F95 std., 9.3.5. */ 
   library_end ();
 }