summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-02-04 15:52:28 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-02-04 15:52:28 +0000
commit6b5dc99b4986c9eafe9d77b742f26f7e27ea9012 (patch)
treef06bedbb7a1ec754050820b9c8564ad3c1e80d06 /tests
parent1ce778626a8511c7136bf19ca069cd74069975b7 (diff)
downloadmpfr-6b5dc99b4986c9eafe9d77b742f26f7e27ea9012.tar.gz
[tests/tatan2u.c] Improved comment in bug20210203 about type sizes.
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14363 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r--tests/tatan2u.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/tatan2u.c b/tests/tatan2u.c
index 64c5246a3..e09ccf54b 100644
--- a/tests/tatan2u.c
+++ b/tests/tatan2u.c
@@ -527,9 +527,12 @@ check_random (void)
static void
bug20210203 (void)
{
-#if GMP_NUMB_BITS >= 64 || MPFR_PREC_BITS >= 64
- /* then 64-bit constants are supported */
+ /* The "#if" makes sure that 64-bit constants are supported, avoiding
+ a compilation failure. The "if" makes sure that the constant is
+ representable in an unsigned long (this would not be the case with
+ 32-bit unsigned long and 64-bit limb). */
+#if GMP_NUMB_BITS >= 64 || MPFR_PREC_BITS >= 64
mpfr_t x, y, z;
unsigned long u = 13484982567905493265;
@@ -554,7 +557,6 @@ bug20210203 (void)
mpfr_clear (y);
mpfr_clear (z);
}
-
#endif
}