This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] patch PR libfortran/19155
- From: Steven Bosscher <stevenb at suse dot de>
- To: fortran at gcc dot gnu dot org
- Cc: FranÃois-Xavier Coudert <Francois-Xavier dot Coudert at lcp dot u-psud dot fr>, patch <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 9 May 2005 12:14:33 +0200
- Subject: Re: [gfortran] patch PR libfortran/19155
- References: <427F3087.40705@lcp.u-psud.fr>
On Monday 09 May 2005 11:42, FranÃois-Xavier Coudert wrote:
> I propose this patch to fix PR libfortran/19115. With this patch, the I/O
> library accepts 'E+00' as a valid real number (with value 0.0). The
> standard says it is not a valid real number, but doesn't require an error.
>
> Reasons for this choice: g77 accepts it, as well as numerous other Fortran
> compilers (Intel, Portland, Sun, IBM). It is even part of the NIST
> testsuite (one of the last NIST failures for gfortran).
> @@ -538,7 +538,8 @@ read_f (fnode * f, char *dest, int lengt
>
> /* A digit (or a '.') is required at this point */
>
> - if (!isdigit (*p) && *p != '.')
> + if (!isdigit (*p) && *p != '.' && *p != 'd' && *p != 'D'
> + && *p != 'e' && *p != 'E')
> goto bad_float;
>
> /* Remember the position of the first digit. */
That "A digit ..." comment needs updating with this patch.
Looks good enough otherwise :-) Thanks.
Gr.
Steven