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/26161] Configure tests for pthread.h sometimes need to use -pthread



------- Comment #3 from roger at eyesopen dot com  2006-02-08 04:04 -------
Subject: Re:  Configure tests for pthread.h sometimes
 need to use -pthread


On 7 Feb 2006, fxcoudert at gcc dot gnu dot org wrote:
> I tried to give it a look on alphaev68-dec-osf5.1b, but I couldn't
> get to the point of configuring libgomp :)
>
> cc -c -DHAVE_CONFIG_H -g  -I. -I../../gcc/libiberty/../include   -Wc++-compat
> ../../gcc/libiberty/floatformat.c -o ./floatformat.o
> cc: Error: ../../gcc/libiberty/floatformat.c, line 343: In this statement, the
> libraries on this platform do not yet support compile-time evaluation of the
> constant expression "0.0/0.0". (constfoldns)
>         dto = NAN;


Hi FX,

Could you try the following for me, and I'll submit it to gcc-patches?
Unfortunately, my OSF_DEV PAK has expired so I rely on gcc for hosting
GCC.



2006-02-07  Roger Sayle  <roger@eyesopen.com>
            R. Scott Bailey  <scott.bailey@eds.com>

        PR bootstrap/16787
        * floatformat.c: Include <float.h> where available.
        (NAN): Use value of DBL_QNAN if defined, and NAN isn't.


Index: floatformat.c
===================================================================
*** floatformat.c       (revision 110738)
--- floatformat.c       (working copy)
***************
*** 1,5 ****
  /* IEEE floating point support routines, for GDB, the GNU Debugger.
!    Copyright 1991, 1994, 1999, 2000, 2003, 2005
     Free Software Foundation, Inc.

  This file is part of GDB.
--- 1,5 ----
  /* IEEE floating point support routines, for GDB, the GNU Debugger.
!    Copyright 1991, 1994, 1999, 2000, 2003, 2005, 2006
     Free Software Foundation, Inc.

  This file is part of GDB.
*************** Foundation, Inc., 51 Franklin Street - F
*** 31,36 ****
--- 31,41 ----
  #include <string.h>
  #endif

+ /* On some platforms, <float.h> provides DBL_QNAN.  */
+ #ifdef STDC_HEADERS
+ #include <float.h>
+ #endif
+
  #include "ansidecl.h"
  #include "libiberty.h"
  #include "floatformat.h"
*************** Foundation, Inc., 51 Franklin Street - F
*** 44,51 ****
--- 49,60 ----
  #endif

  #ifndef NAN
+ #ifdef DBL_QNAN
+ #define NAN DBL_QNAN
+ #else
  #define NAN (0.0 / 0.0)
  #endif
+ #endif

  static unsigned long get_field (const unsigned char *,
                                  enum floatformat_byteorders,


Roger
--


-- 


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


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