This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch to remove warnings in fp-bit.c
- To: egcs-patches at cygnus dot com
- Subject: patch to remove warnings in fp-bit.c
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Fri, 9 Oct 1998 12:29:46 -0400 (EDT)
Now that powerpc bootstraps work :-) here's a patch to clean
up all the warnings in fp-bit.c. In addition to the implicit int
warnings which were pre-approved a month ago, I got two more to finish
this file.
The variable `tmp' being unused *looked* like it could simply
be removed. But I wasn't sure because it was in a library routine.
On the other hand, the function is declared static INLINE so its not
exported. But I punted and used the attribute. If its safe to nuke,
just let me know.
--Kaveh
Fri Oct 9 12:13:15 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* fp-bit.c (SFtype): Don't implicitly use int in declaration.
(DFtype): Likewise.
(_fpdiv_parts): Mark parameter `tmp' with __attribute__((__unused__)).
(si_to_float): Cast numeric constant to the __typeof__ the
variable it is being compared to.
--- egcs-CVS19981008/gcc/config/fp-bit.c~ Thu Oct 8 23:49:06 1998
+++ egcs-CVS19981008/gcc/config/fp-bit.c Fri Oct 9 12:06:13 1998
@@ -156,8 +156,8 @@ __floatsixf (){ abort(); }
#else /* !EXTENDED_FLOAT_STUBS, rest of file */
-typedef SFtype __attribute__ ((mode (SF)));
-typedef DFtype __attribute__ ((mode (DF)));
+typedef float SFtype __attribute__ ((mode (SF)));
+typedef float DFtype __attribute__ ((mode (DF)));
typedef int HItype __attribute__ ((mode (HI)));
typedef int SItype __attribute__ ((mode (SI)));
@@ -1000,7 +1000,7 @@ multiply (FLO_type arg_a, FLO_type arg_b
static INLINE fp_number_type *
_fpdiv_parts (fp_number_type * a,
fp_number_type * b,
- fp_number_type * tmp)
+ fp_number_type * tmp __attribute__ ((__unused__)))
{
fractype bit;
fractype numerator;
@@ -1331,7 +1331,7 @@ si_to_float (SItype arg_a)
{
/* Special case for minint, since there is no +ve integer
representation for it */
- if (arg_a == 0x80000000)
+ if (arg_a == (__typeof__(arg_a)) 0x80000000)
{
return -2147483648.0;
}