This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, libgfortran] PR78351 comma not terminating READ of formatted input field
- From: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- To: Jerry DeLisle <jvdelisle at charter dot net>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 4 Nov 2018 10:51:43 +0100
- Subject: Re: [patch, libgfortran] PR78351 comma not terminating READ of formatted input field
- References: <b656db0b-04da-2303-e07c-44f7237bfe47@charter.net>
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// ?