changeset 10712:6071b628cb19

signbit: avoid spurious compiler failure * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Move non-constant declarations inside function. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Sat, 25 Oct 2008 07:59:32 -0600
parents e161b51e4184
children a7725c751427
files ChangeLog m4/signbit.m4
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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>
 
--- a/m4/signbit.m4
+++ b/m4/signbit.m4
@@ -124,6 +124,8 @@
 ])
 
 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 @@
 #else
 long double m0l = -p0l;
 #endif
-int main ()
-{
   {
     float plus_inf = 1.0f / p0f;
     float minus_inf = -1.0f / p0f;