(float_to_si): Correct return value when Inf.
authorRichard Kenner <kenner@gcc.gnu.org>
Fri, 27 Jun 1997 17:23:33 +0000 (13:23 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 27 Jun 1997 17:23:33 +0000 (13:23 -0400)
From-SVN: r14328

gcc/config/fp-bit.c

index b8bf9cd3d027e6f5f9a68fd0491344eb28ba193a..bc3ad51ec9313b64c670daa11e37e4ad8ddc5d4b 100644 (file)
@@ -1,8 +1,7 @@
 /* This is a software floating point library which can be used instead of
    the floating point routines in libgcc1.c for targets without hardware
-   floating point.  */
-
-/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+   floating point. 
+ Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 
 This file is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -1274,7 +1273,7 @@ float_to_si (FLO_type arg_a)
     return 0;
   /* get reasonable MAX_SI_INT... */
   if (isinf (&a))
-    return a.sign ? MAX_SI_INT : (-MAX_SI_INT)-1;
+    return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
   /* it is a number, but a small one */
   if (a.normal_exp < 0)
     return 0;