This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/16787] New: NAN constant "(0.0/0.0)" cannot be compiled by Tru64 cc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]