public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/19933] New: Problem with define of HUGE_VAL in math_c99.
@ 2005-02-13 18:17 casevh at comcast dot net
  2005-02-13 20:13 ` [Bug target/19933] " pinskia at gcc dot gnu dot org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: casevh at comcast dot net @ 2005-02-13 18:17 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2005-05-29 20:53 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-13 18:17 [Bug preprocessor/19933] New: Problem with define of HUGE_VAL in math_c99 casevh at comcast dot net
2005-02-13 20:13 ` [Bug target/19933] " pinskia at gcc dot gnu dot org
2005-03-04 18:10 ` ebotcazou at gcc dot gnu dot org
2005-03-04 18:12 ` ebotcazou at gcc dot gnu dot org
2005-03-07  6:15 ` casevh at comcast dot net
2005-03-22 20:53 ` jsm28 at gcc dot gnu dot org
2005-04-30 17:10 ` ebotcazou at gcc dot gnu dot org
2005-05-01 12:21 ` ebotcazou at gcc dot gnu dot org
2005-05-01 14:24 ` joseph at codesourcery dot com
2005-05-03  9:49 ` ebotcazou at gcc dot gnu dot org
2005-05-03 10:55 ` joseph at codesourcery dot com
2005-05-03 11:36 ` ebotcazou at gcc dot gnu dot org
2005-05-03 13:02 ` joseph at codesourcery dot com
2005-05-03 14:39 ` ebotcazou at gcc dot gnu dot org
2005-05-03 16:22 ` joseph at codesourcery dot com
2005-05-19  7:06 ` cvs-commit at gcc dot gnu dot org
2005-05-19  7:12 ` cvs-commit at gcc dot gnu dot org
2005-05-19  7:16 ` ebotcazou at gcc dot gnu dot org
2005-05-24 13:39 ` ebotcazou at gcc dot gnu dot org
2005-05-29 20:53 ` ebotcazou at gcc dot gnu dot org
2005-05-29 20:53 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).