]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Update commentary.
authorRichard Henderson <rth@gcc.gnu.org>
Wed, 26 Feb 2003 21:07:40 +0000 (13:07 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 26 Feb 2003 21:07:40 +0000 (13:07 -0800)
From-SVN: r63484

gcc/real.c

index d04afabfe1dd63443dee0b8a5e989dc5c92356c1..1e70bf7d4d95d94548a3c431b40dba3f6e83f19e 100644 (file)
@@ -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;