This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Irix6 casting long double to double yields bogus results
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: 03 Feb 2003 11:27:19 -0200
- Subject: Re: Irix6 casting long double to double yields bogus results
- Organization: GCC Team, Red Hat
- References: <200301291751.MAA04321@caip.rutgers.edu><or8yx3mfqi.fsf@free.redhat.lsd.ic.unicamp.br><200301301539.KAA21539@caip.rutgers.edu>
On Jan 30, 2003, "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> wrote:
> (There are still two other tp-bit.c warnings remaining.)
> tp-bit.c:1392: warning: no previous prototype for `__fixunstfsi'
> tp-bit.c:1392: warning: no previous prototype for `__fixunstfsi'
This should fix them. Care to give them a round of testing?
--- fp-bit.c.~1.39.~ 2003-01-26 08:06:25.000000000 -0200
+++ fp-bit.c 2003-02-03 11:24:39.000000000 -0200
@@ -1377,7 +1381,7 @@ float_to_si (FLO_type arg_a)
#endif /* L_sf_to_si || L_df_to_si */
#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
-#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
+#if defined US_SOFTWARE_GOFAST
/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
we also define them for GOFAST because the ones in libgcc2.c have the
wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
As for explaining what's going on: I was out of my mind when I forced
the function to be defined for L_tf_to_usi, GCC just doesn't use it.
The other variants are only used for GOFAST compatibility. We might
as well go ahead and take out L_tf_to_usi entirely from Makefile.in
and config/fp-bit.[ch], but there's no good reason to do so, and some
day GCC might be able to use float_to_unsigned anyway, so we might as
well leave it there.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer