diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-06-27 17:23:33 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-06-27 17:23:33 +0000 |
commit | f85712132b014511ea8951a9d1fa044b1d43e29c (patch) | |
tree | 98528f7b18f788e096665a285dff35e12b901f4c /gcc/config/fp-bit.c | |
parent | eb62b0c56f5d02e5d4ce0790a123f48564bdd879 (diff) | |
download | gcc-f85712132b014511ea8951a9d1fa044b1d43e29c.tar.gz |
(float_to_si): Correct return value when Inf.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14328 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/fp-bit.c')
-rw-r--r-- | gcc/config/fp-bit.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/config/fp-bit.c b/gcc/config/fp-bit.c index b8bf9cd3d02..bc3ad51ec93 100644 --- a/gcc/config/fp-bit.c +++ b/gcc/config/fp-bit.c @@ -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; |