bug-guile
[Top][All Lists]
Advanced

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

Re: guile 1.6.8 make check failure on AIX 6.1


From: Rainer Tammer
Subject: Re: guile 1.6.8 make check failure on AIX 6.1
Date: Mon, 04 Feb 2008 09:31:52 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.0

Hello Neil,
sorry to bother you again...

Now I have another error:

cc1: warnings being treated as errors
numbers.c: In function 'guile_ieee_init':
numbers.c:617: warning: dereferencing type-punned pointer will break strict-aliasing rules numbers.c:640: warning: dereferencing type-punned pointer will break strict-aliasing rules
numbers.c: In function 'scm_exp':
numbers.c:6081: error: '__I' undeclared (first use in this function)
numbers.c:6081: error: (Each undeclared identifier is reported only once
numbers.c:6081: error: for each function it appears in.)

The error in line 617/640 could be resolved by an -fno-strict-aliasing but the error in line 6081 is a real one...

#define SCM_COMPLEX_VALUE(z)                                    \
 (SCM_COMPLEX_REAL (z) + _Complex_I * SCM_COMPLEX_IMAG (z))

The problem is in _Complex_I

AIX 6.1 defines in complex.h

/*.
* a constant expression of type const float _Complex with the
* value of the imaginary unit. (a number i such that i**2 =-1).
* __I is provided by the AIX xlc C99 compiler.
* WARNING: DO NOT USE __I DIRECTLY in an application. Always
* use _Complex_I .
*/
#define _Complex_I    __I

Would it be possible to changed this:

From gcc doc:

To write a constant with a complex data type, use the suffix `i' or `j' (either one; they are equivalent). For example, |2.5fi| has type |_Complex float| and |3i| has type |_Complex int|. Such a constant always has a pure imaginary value, but you can form any complex value you like by adding one to a real constant. This is a GNU extension; if you have an ISO C99 conforming C library (such as GNU libc), and want to construct complex constants of floating type, you should include |<complex.h>| and use the macros |I| or |_Complex_I| instead.

#define SCM_COMPLEX_VALUE(z)                                    \
 (SCM_COMPLEX_REAL (z) + _Complex_I * SCM_COMPLEX_IMAG (z))

#define SCM_COMPLEX_VALUE(z)                                    \
 (SCM_COMPLEX_REAL (z) + 1.0fi * SCM_COMPLEX_IMAG (z))

The second version works with gcc 4.2.2 and IBM XL C/C++ 9.0

Bye
 Rainer






reply via email to

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