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/45108] Namelist read: Not aborted when reading from STDIN



------- 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


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