[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
signbit.m4 spurious failure
From: |
Eric Blake |
Subject: |
signbit.m4 spurious failure |
Date: |
Wed, 22 Oct 2008 17:27:40 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
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
...
| float p0f = 0.0f;
| float m0f = -p0f;
| double p0d = 0.0;
| double m0d = -p0d;
...
GCC is (rightfully) complaining that -p0f is not a constant initializer,
therefore it can't be used to initialize the variable m0f at global scope.
I'm not sure of the best fix, but it seems like moving the initialization into
function scope would do the trick.
--
Eric Blake
- signbit.m4 spurious failure,
Eric Blake <=