This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: list-directed float output in libg2c.a
- To: A dot Achenbach at em dot uni-frankfurt dot de
- Subject: Re: patch: list-directed float output in libg2c.a
- From: craig at jcb-sc dot com
- Date: 6 Mar 1999 04:52:45 -0000
- Cc: egcs-patches at cygnus dot com
- Cc: craig at jcb-sc dot com
- References: <36E02C2E.967819EE@em.uni-frankfurt.de>
>This is a patch for libg2c.a that enables type-dependent output
>precision in list-directed output of REAL and COMPLEX data.
>In short, with this patch applied, WRITE(n, *) now writes
> REAL*4 types with FLT_DIG digits,
> REAL*8 types with DBL_DIG digits,
> COMPLEX*8 types with FLT_DIG digits each component,
> COMPLEX*16 types with DBL_DIG digits each component.
>The original behaviour was to always write 9 digits, which
>usually is too much for single precision and too few for
>double precision.
Offhand, this looks like what libf2c should have done in the first
place. I'll forward it along to the libf2c maintainer, to see
what he says.
I'm unsure about whether to make this change in g77 at this time.
I feel a future libg77 should default to the behavior you
recommend, but don't know whether g77 users would want this
change to occur before that time. (libg77 would mean a pretty
significant change in a lot of behaviors of g77, so one like this
would be more acceptable than it might be at other times.)
If libf2c goes with these changes, or something like them, I'd think
that's enough justification for bringing them into egcs-g77. Maybe
a macro people could define to get the old behavior would be a good
idea.
tq vm, (burley)