aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/dfp-bit.c
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2006-11-21 20:40:26 +0000
committerJanis Johnson <janis@gcc.gnu.org>2006-11-21 20:40:26 +0000
commitcab82f5c37685fc1a3ac087ca5b88599dacadfc4 (patch)
tree7e20800dedead5353f25bc11b9b5a1c8a3556b55 /gcc/config/dfp-bit.c
parentd44963af3cca13f72aa04415e380750d1ba3fc78 (diff)
downloadgcc-cab82f5c37685fc1a3ac087ca5b88599dacadfc4.zip
gcc-cab82f5c37685fc1a3ac087ca5b88599dacadfc4.tar.gz
gcc-cab82f5c37685fc1a3ac087ca5b88599dacadfc4.tar.bz2
dfp-bits.c (DFP_TO_INT): Remove code to saturate result of conversion that doesn't fit.
* config/dfp-bits.c (DFP_TO_INT): Remove code to saturate result of conversion that doesn't fit. From-SVN: r119069
Diffstat (limited to 'gcc/config/dfp-bit.c')
-rw-r--r--gcc/config/dfp-bit.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/gcc/config/dfp-bit.c b/gcc/config/dfp-bit.c
index fafe7dc..fc75a8b 100644
--- a/gcc/config/dfp-bit.c
+++ b/gcc/config/dfp-bit.c
@@ -404,29 +404,6 @@ DFP_TO_INT (DFP_C_TYPE x)
decNumberFromString (&qval, (char *) "1.0", &context);
/* Force the exponent to zero. */
decNumberQuantize (&n1, &n2, &qval, &context);
- /* This is based on text in N1107 section 5.1; it might turn out to be
- undefined behavior instead. */
- if (context.status & DEC_Invalid_operation)
- {
-#if defined (L_sd_to_si) || defined (L_dd_to_si) || defined (L_td_to_si)
- if (decNumberIsNegative(&n2))
- return INT_MIN;
- else
- return INT_MAX;
-#elif defined (L_sd_to_di) || defined (L_dd_to_di) || defined (L_td_to_di)
- if (decNumberIsNegative(&n2))
- /* Find a defined constant that will work here. */
- return (-9223372036854775807LL - 1LL);
- else
- /* Find a defined constant that will work here. */
- return 9223372036854775807LL;
-#elif defined (L_sd_to_usi) || defined (L_dd_to_usi) || defined (L_td_to_usi)
- return UINT_MAX;
-#elif defined (L_sd_to_udi) || defined (L_dd_to_udi) || defined (L_td_to_udi)
- /* Find a defined constant that will work here. */
- return 18446744073709551615ULL;
-#endif
- }
/* Get a string, which at this point will not include an exponent. */
decNumberToString (&n1, buf);
/* Ignore the fractional part. */