signbit: avoid spurious compiler failure
authorEric Blake <ebb9@byu.net>
Sat, 25 Oct 2008 13:59:32 +0000 (07:59 -0600)
committerEric Blake <ebb9@byu.net>
Sat, 25 Oct 2008 13:59:32 +0000 (07:59 -0600)
* m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Move non-constant
declarations inside function.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
m4/signbit.m4

index a69786d..1516ccc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-25  Eric Blake  <ebb9@byu.net>
+
+       signbit: avoid spurious compiler failure
+       * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Move non-constant
+       declarations inside function.
+
 2008-10-24  Simon Josefsson  <simon@josefsson.org>
             Bruno Haible  <bruno@clisp.org>
 
index 6e7eb13..e9c1e37 100644 (file)
@@ -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;