This is the mail archive of the
mailing list for the GCC project.
Re: [gfortran] I/O of large integer and real kinds
- From: Richard Henderson <rth at redhat dot com>
- To: FX Coudert <fxcoudert at gmail dot com>
- Cc: patch <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Tue, 7 Jun 2005 12:17:24 -0700
- Subject: Re: [gfortran] I/O of large integer and real kinds
- References: <42A4C151.firstname.lastname@example.org>
On Mon, Jun 06, 2005 at 11:34:09PM +0200, FX Coudert wrote:
> + *((GFC_REAL_4 *) dest) =
> #if defined(HAVE_STRTOF)
> strtof (buffer, NULL);
> - (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;
> +#if defined(HAVE_GFC_REAL_16) && defined (HAVE_STRTOLD)
> + case 16:
> + *((GFC_REAL_16 *) dest) = strtold (buffer, NULL);
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