From 9374a8b4bcd3167f3bb4a068d0571dc9ef7b9d6e Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 6 Oct 2008 06:23:12 -0600 Subject: [PATCH] test-signbit: avoid tripping Irix cc bug on -0.0L * tests/test-signbit.c (minus_zerol): Delete, and replace with '-zerol'. This may break on HP-UX/hppa, but at least makes the entire testsuite consistent and avoids an Irix 6.2 bug. Signed-off-by: Eric Blake --- ChangeLog | 7 +++++++ tests/test-signbit.c | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e7db98509..5345c11a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-06 Eric Blake + + test-signbit: avoid tripping Irix cc bug on -0.0L + * tests/test-signbit.c (minus_zerol): Delete, and replace with + '-zerol'. This may break on HP-UX/hppa, but at least makes the + entire testsuite consistent and avoids an Irix 6.2 bug. + 2008-10-05 Bruno Haible Jim Meyering diff --git a/tests/test-signbit.c b/tests/test-signbit.c index 30ba1b07e..95ba61305 100644 --- a/tests/test-signbit.c +++ b/tests/test-signbit.c @@ -39,9 +39,6 @@ float zerof = 0.0f; double zerod = 0.0; long double zerol = 0.0L; -/* We cannot use the expression '-zerol' here, because on HP-UX/hppa it - evaluates to 0.0L, not -0.0L. */ -long double minus_zerol = -0.0L; static void test_signbitf () @@ -143,7 +140,7 @@ test_signbitl () ASSERT (signbit (-2.718e-30L)); /* Zeros. */ ASSERT (!signbit (0.0L)); - if (1.0L / minus_zerol < 0) + if (1.0L / -zerol < 0) ASSERT (signbit (-zerol)); else ASSERT (!signbit (-zerol)); -- 2.11.0