This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/16787] New: NAN constant "(0.0/0.0)" cannot be compiled by Tru64 cc
- From: "scott dot bailey at eds dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jul 2004 19:23:06 -0000
- Subject: [Bug bootstrap/16787] New: NAN constant "(0.0/0.0)" cannot be compiled by Tru64 cc
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Bootstrap of gcc-3.4.1 fails using cc compiler under Tru64 V5.1B, trying to
compile libiberty/floatformat.c. The macro NAN is defined as the constant
expression "(0.0 / 0.0)", which is not compilable by HP's cc compiler.
The following kludgy patch was sufficient to get me past the problem, but is
totally inappropriate "as-is" for a generic fix. :-)
*** libiberty/floatformat.c Wed Dec 3 13:36:50 2003
--- libiberty/floatformat.c Tue Jul 27 15:09:15 2004
***************
*** 43,49 ****
#endif
#ifndef NAN
! #define NAN (0.0 / 0.0)
#endif
static unsigned long get_field PARAMS ((const unsigned char *,
--- 43,50 ----
#endif
#ifndef NAN
! #include "float.h"
! #define NAN DBL_QNAN
#endif
static unsigned long get_field PARAMS ((const unsigned char *,
--
Summary: NAN constant "(0.0/0.0)" cannot be compiled by Tru64 cc
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: scott dot bailey at eds dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: alphaev56-dec-osf5.1
GCC host triplet: alphaev56-dec-osf5.1
GCC target triplet: alphaev56-dec-osf5.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16787