diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-26 21:07:40 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-26 21:07:40 +0000 |
commit | 6ed7aa13e7a86c24a576903e75ceabb8037070ab (patch) | |
tree | 475d251159529c14f0e14a5419a166e4af731ffd /gcc/real.c | |
parent | 1f0ca6c6102e44ce21dc57309ccf83732f9fa779 (diff) | |
download | gcc-6ed7aa13e7a86c24a576903e75ceabb8037070ab.tar.gz |
Update commentary.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/real.c')
-rw-r--r-- | gcc/real.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/real.c b/gcc/real.c index d04afabfe1d..1e70bf7d4d9 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -1311,6 +1311,10 @@ real_to_integer (r) case rvc_normal: if (r->exp <= 0) goto underflow; + /* Only force overflow for unsigned overflow. Signed overflow is + undefined, so it doesn't matter what we return, and some callers + expect to be able to use this routine for both signed and + unsigned conversions. */ if (r->exp > HOST_BITS_PER_WIDE_INT) goto overflow; @@ -1371,6 +1375,10 @@ real_to_integer2 (plow, phigh, r) exp = r->exp; if (exp <= 0) goto underflow; + /* Only force overflow for unsigned overflow. Signed overflow is + undefined, so it doesn't matter what we return, and some callers + expect to be able to use this routine for both signed and + unsigned conversions. */ if (exp > 2*HOST_BITS_PER_WIDE_INT) goto overflow; |