This is the mail archive of the gcc-patches@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]

Re: [Patch, libfortran] PR45629 Get rid of setjmp/longjmp in the IO library


On 11/01/2010 04:30 PM, Janne Blomqvist wrote:
Hi,

the attached patch gets rid of the setjmp()/longjmp() based EOF
handling in list directed reads. It also fixes PR 45629.

Tested on x86_64-unknown-linux-gnu, Ok for trunk?  I understand stage
1 just ended, and as EOF handling has been a rich source of tricky
bugs in the IO library, I'm perfectly Ok with postponing this until
4.7.

Overall I like the patch.


I am concerned about the changes to st_parameter_dt. To be on the safe side I wonder if you should do something like this? (Maybe I worry too much. ;) )

Index: io.h
===================================================================
--- io.h	(revision 164907)
+++ io.h	(working copy)
@@ -435,7 +427,7 @@ typedef struct st_parameter_dt
 	  unsigned format_not_saved : 1;
 	  /* 14 unused bits.  */

-	  char last_char;
+	  char old_last_char; /* Remove when ABI breaks.  */
 	  char nml_delim;

 	  int repeat_count;
@@ -446,7 +438,7 @@ typedef struct st_parameter_dt
 	  char *scratch;
 	  char *line_buffer;
 	  struct format_data *fmt;
-	  jmp_buf *eof_jump;
+	  jmp_buf *eof_jump; /* Remove when ABI breaks.  */
 	  namelist_info *ionml;
 	  /* A flag used to identify when a non-standard expanded namelist read
 	     has occurred.  */
@@ -456,6 +448,7 @@ typedef struct st_parameter_dt
 	     largest kind.  */
 	  char value[32];
 	  GFC_IO_INT size_used;
+	  int last_char;
 	} p;
       /* This pad size must be equal to the pad_size declared in
 	 trans-io.c (gfc_build_io_library_fndecls).  The above structure

Otherwise patch is OK.

Jerry


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