This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45108] Namelist read: Not aborted when reading from STDIN
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2010 09:04:38 -0000
- Subject: [Bug fortran/45108] Namelist read: Not aborted when reading from STDIN
- References: <bug-45108-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from burnus at gcc dot gnu dot org 2010-08-19 09:04 -------
(In reply to comment #6)
> This patch will generate an error. If IOSTAT or IOMSG is used, the read will
> continue in the loop after an error, but the error status variables will be set
> so that one will know an error occurred when the READ has completed. Any
> thoughts Tobias?
I think that's useful. One can use the interactive dialog to query about the
correct format (as before), if one enters the correct nml one returns without
error (as before), but if one enters an invalid namelist one returns (as
before) but with an error status (new) and without an warning ("namelist read:
misplaced = sign") [new]. (One can use iomsg to get the error string.) And
without err=/iostat=, one gets a run-time error as before.
[Admittedly, I have never used the ? / =? feature thus I might overlook a
useful application which won't work with the new patch, but it seems as if most
things continue to work.]
Thus, I think the patch is fine. As it is not test-suite testable, no test case
is needed. From my side the patch is OK for committal.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45108