This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Enhance testsuite c-torture test
From: Jonathan Lennox <lennox@cs.columbia.edu>
Date: Sun, 12 May 2002 21:16:07 -0400
David S. Miller wrote:
> +int
> +ldnear (double x, double y)
> +{
> + double t = x - y;
> + return t == 0 || x / t > 100000000000000000000000000000000.0;
> +}
Shouldn't the arguments to this function, and the local variable, be 'long
double' rather than 'double'? This looks like a copy-and-paste error from
dnear immediately above.
Good spotting, fixed as follows:
2002-05-12 David S. Miller <davem@redhat.com>
* gcc.c-torture/execute/conversion.c (ldnear): Use long double
types.
--- gcc.c-torture/execute/conversion.c.~1~ Fri May 10 09:13:05 2002
+++ gcc.c-torture/execute/conversion.c Sun May 12 19:19:40 2002
@@ -65,9 +65,9 @@ dnear (double x, double y)
}
int
-ldnear (double x, double y)
+ldnear (long double x, long double y)
{
- double t = x - y;
+ long double t = x - y;
return t == 0 || x / t > 100000000000000000000000000000000.0;
}