This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Irix6 casting long double to double yields bogus results


 > From: Alexandre Oliva <aoliva@redhat.com>
 > 
 > On Jan 29, 2003, "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> wrote:
 > 
 > > I've been running some tests on irix6 floating point and noticed a
 > > problem.  Casting from long double to double seems to be broken now.
 > 
 > I doubt it ever worked with software-emulated 128-bit long doubles :-(
 > I hate the convoluted logic we use to decide whether to declare the
 > __make_[sdt]f functions.  I'm checking this obvious patch in for now,
 > 
 > 	* config/fp-bit.h (__make_dp): Declare if TMODES.
 > 
 > RCS file: /cvs/gcc/gcc/gcc/config/fp-bit.h,v
 > retrieving revision 1.9
 > diff -u -p -r1.9 fp-bit.h
 > --- gcc/config/fp-bit.h 26 Jan 2003 10:06:57 -0000 1.9
 > +++ gcc/config/fp-bit.h 30 Jan 2003 04:17:06 -0000
 > @@ -521,6 +521,7 @@ extern TFtype df_to_tf (DFtype);
 >  #endif /* ! FLOAT */
 >  
 >  #ifdef TMODES
 > +extern DFtype __make_dp (fp_class_type, unsigned int, int, UDItype);
 >  extern TFtype __make_tp (fp_class_type, unsigned int, int, UTItype);
 >  #ifdef TFLOAT
 >  #if defined(L_tf_to_sf)


Ah ha!  This also fixes two warnings in tp-bit.c

tp-bit.c:1588: warning: implicit declaration of function `__make_dp'
tp-bit.c:1588: warning: implicit declaration of function `__make_dp'

(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'

Right now we don't turn on -Werror for target files like libgcc2.c
etc, but I'm going to eventually turn it on to catch things like
this... :-)

Thanks for the quick fix!

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]