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, libgfortran] PR78351 comma not terminating READ of formatted input field


On Sat, 3 Nov 2018 15:33:07 -0700
Jerry DeLisle <jvdelisle@charter.net> wrote:

> diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
> index 31198a3cc39..0d26101cef0 100644
> --- a/libgfortran/io/transfer.c
> +++ b/libgfortran/io/transfer.c

> @@ -260,22 +250,80 @@ read_sf_internal (st_parameter_dt *dtp, size_t *length)
>        sseek (dtp->u.p.current_unit->s, -1, SEEK_CUR);
>      }
>  
> -  lorig = *length;
> -  if (is_char4_unit(dtp))
> +  /* To support legacy code we have to scan the input string one byte
> +     at a time because we don't no where an early comma may be and the

As Andreas said s/no/know/

> +     requested length could go passed the end of a comma shortened

s/passed/past/

> +      /* Get the first chracter of the string to establish the base

s/chracter/character/

> +      /* Now we scan the rest and exit deal with an end-of-file

s/ exit// ?



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