[gfortran] I/O of large integer and real kinds
Richard Henderson
rth@redhat.com
Tue Jun 7 19:17:00 GMT 2005
On Mon, Jun 06, 2005 at 11:34:09PM +0200, FX Coudert wrote:
> + *((GFC_REAL_4 *) dest) =
> #if defined(HAVE_STRTOF)
> strtof (buffer, NULL);
> #else
> - (float) strtod (buffer, NULL);
> + (GFC_REAL_4) strtod (buffer, NULL);
If you're going to pretend that GFC_REAL_4 is anything besides float,
then you need to use some mechanism to select the proper libc routine.
This is going to be all over libgfortran.
> +#if defined(HAVE_GFC_REAL_10) && defined (HAVE_STRTOLD)
> + case 10:
> + *((GFC_REAL_10 *) dest) = strtold (buffer, NULL);
> + break;
> +#endif
> +#if defined(HAVE_GFC_REAL_16) && defined (HAVE_STRTOLD)
> + case 16:
> + *((GFC_REAL_16 *) dest) = strtold (buffer, NULL);
> break;
> +#endif
There are targets for which both real10 and real16 exist. Obviously,
only one of them corresponds to long double. amd64-linux is one of
these; ia64-hpux is another.
This applies again when it comes to your shell script that creates
the typedefs.
r~
More information about the Fortran
mailing list