Irix6 casting long double to double yields bogus results

Alexandre Oliva
Mon Feb 3 13:29:00 GMT 2003

On Jan 30, 2003, "Kaveh R. Ghazi" <> 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)
 /* 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
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
Red Hat GCC Developer                 aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist                Professional serial bug killer

More information about the Gcc-bugs mailing list