[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: signbit.m4 spurious failure
From: |
Eric Blake |
Subject: |
Re: signbit.m4 spurious failure |
Date: |
Sat, 25 Oct 2008 08:00:28 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 10/22/2008 11:27 AM:
> I noticed that on cygwin, signbit switched from detected to undetected, and
> traced it to the following:
>
> configure:42677: checking for signbit macro
> configure:42768: ccache gcc -std=gnu99 -o conftest.exe -gdwarf-2 -Wall
> -Wl,--a
> s-needed conftest.c >&5
> conftest.c:352: error: initializer element is not constant
> conftest.c:354: error: initializer element is not constant
> conftest.c:363: error: initializer element is not constant
> I'm not sure of the best fix, but it seems like moving the
initialization into
> function scope would do the trick.
>
I'm committing this:
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkkDJnwACgkQ84KuGfSFAYBmfwCgr/rTR2AEgnEOfXOytbbG8OWb
mNUAoLtBAIHii9gkHMSUZEtspbxsB+Rb
=+wou
-----END PGP SIGNATURE-----
>From 712387a8796296eb291be0ac0a1eb9b0b6585e7f Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
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 <address@hidden>
---
ChangeLog | 6 ++++++
m4/signbit.m4 | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a69786d..1516ccc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-25 Eric Blake <address@hidden>
+
+ signbit: avoid spurious compiler failure
+ * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Move non-constant
+ declarations inside function.
+
2008-10-24 Simon Josefsson <address@hidden>
Bruno Haible <address@hidden>
diff --git a/m4/signbit.m4 b/m4/signbit.m4
index 6e7eb13..e9c1e37 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;
--
1.6.0.2