[patch, libgfortran] PR31052 Bad IOSTAT values when readings NAMELISTs past EOF

FX Coudert fxcoudert@gmail.com
Sun Mar 18 13:03:00 GMT 2007


:REVIEWMAIL:

> 2007-03-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
>
> 	PR libgfortran/31052
> 	* io/file_position (st_rewind): Fix comments. Remove use of
> 	test_endfile. Don't seek if already at 0 position.  Use new  
> is_special
> 	function to set endfile state.
> 	* io/open.c (test_endfile): Delete this function.
> 	* io/io.h: Delete prototype for test_endfile.  Add prototype
> 	for is_special.
> 	* io/unix.c (is_special): New function. Fix whitespace.
> 	* io/transfer.c (next_record_r): Remove use of test_endfile.

This patch is OK if you can confirm that you reviewed and tested that  
it doesn't affect badly the behaviour for special files other than / 
dev/null.

On a more general note, looking at the code in libgfortran/io/unix.c,  
I think we're starting to use special_file to represent too many  
things (/dev/null, terminals, ...)  Maybe we should have a few  
separate attributes, like
   unsigned special_file:1;
   unsigned tty:1;
   unsigned seekable_special:1;

Anyway, you and Thomas K. are certainly our I/O experts here, so I'd  
appreciate your opinion on this ranting of mine, unrelatedly to you  
commiting the patch if or when you have it tested on different  
special files.

Thanks,
FX



More information about the Gcc-patches mailing list