Python does not compile on Solaris 10 x86 GA. The problem exists with gcc-3.4.3
shipped by Sun with Solaris and with a 3.4.4 snapshot I compiled.

I reproduced the problem with the following code fragment: 

#define _XOPEN_SOURCE 1000
#include <math.h>
int main()
{
  double f=HUGE_VAL;
}

Compiler output is:

$ gcc hv.c
hv.c: In function `main':
hv.c:5: error: incompatible types in initialization
$

Python defines _XOPEN_SOURCE to be greater than 600 so it triggers the inclusion
of math_c99.h.

The fix is editing <iso/math_c99.h>. If I copy /usr/include/iso/math_c99.h to
<gcc-install-dir>/include/iso/math_c99.h and change the line

#define HUGE_VAL        __builtin_huge_val

to

#define HUGE_VAL        __builtin_huge_val().

With this change to math_c99.h, Python compiles properly. Should
mkheaders/fixincludes deal with this?

-- 
           Summary: Problem with define of HUGE_VAL in math_c99.
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: casevh at comcast dot net
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i386-pc-solaris2.10


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19933

Reply via email to