From 712387a8796296eb291be0ac0a1eb9b0b6585e7f Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Sat, 25 Oct 2008 07:59:32 -0600 Subject: [PATCH] signbit: avoid spurious compiler failure * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Move non-constant declarations inside function. Signed-off-by: Eric Blake --- ChangeLog | 6 ++++++ m4/signbit.m4 | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a69786dc5..1516ccc21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-25 Eric Blake + + signbit: avoid spurious compiler failure + * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Move non-constant + declarations inside function. + 2008-10-24 Simon Josefsson Bruno Haible diff --git a/m4/signbit.m4 b/m4/signbit.m4 index 6e7eb1341..e9c1e37f3 100644 --- a/m4/signbit.m4 +++ b/m4/signbit.m4 @@ -124,6 +124,8 @@ AC_DEFUN([gl_SIGNBIT], ]) AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [[ +int main () +{ /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -p0f and -p0d instead. */ float p0f = 0.0f; @@ -140,8 +142,6 @@ long double m0l = -LDBL_MIN * LDBL_MIN; #else long double m0l = -p0l; #endif -int main () -{ { float plus_inf = 1.0f / p0f; float minus_inf = -1.0f / p0f; -- 2.11.0