bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: minus_zero-related tests fail to compile on ppc with recent gcc


From: Jim Meyering
Subject: Re: minus_zero-related tests fail to compile on ppc with recent gcc
Date: Sat, 18 Oct 2008 13:13:14 +0200

Bruno Haible <address@hidden> wrote:
> Jim Meyering wrote:
>> Markus Armbruster <address@hidden> wrote:
>> > With the appended patch, koji ate it up:
>> > http://koji.fedoraproject.org/koji/taskinfo?taskID=886652
>>
>> Great!  Thanks a lot, Markus.
>>
>> Bruno, FYI, Markus discovered that
>> an upcoming idutils release fails to compile on ppc-based systems:
>> (details here http://koji.fedoraproject.org/koji/taskinfo?taskID=886563)
>
> Thanks for the report. Your build pages indicate a cross-compiling build,
> and in this setting I can actually reproduce it. (While Nelson Beebe's
> report says "Apple Mac OS X 10.x PowerPC", I could not reproduce any
> problem on MacOS X 10.3.9.)
>
> $ uname -sr
> Darwin 9.3.0
> $ gcc --version| head -1
> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
> $ cat foo.c
> static long double one = 1.0L * 1.0L;
> static long double quarter = 0.5L * 0.5L;
> static long double third = 1.0L / 3.0L;
> #include <float.h>
> long double minus_zero = -LDBL_MIN * LDBL_MIN;
> $ gcc -arch ppc -c foo.c
> foo.c:3: error: initializer element is not constant
> foo.c:5: error: initializer element is not constant
>
> I don't much like the requirement to define minus_zero in every function
> that needs it. Therefore I'm applying this. It also fixes the problem,
> and takes care of the special compiler bugs in HP-UX cc and in IRIX 6.2 cc
> (see <http://lists.gnu.org/archive/html/bug-gnulib/2008-10/msg00116.html>).
>
>
> 2008-10-17  Bruno Haible  <address@hidden>
>
>       * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): On platforms other than
>       HP-UX and IRIX, use -0.0L.
...

That solved my problem.
Thanks!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]