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: [gfortran] patch PR libfortran/19155


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



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