]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/16787 (NAN constant "(0.0/0.0)" cannot be compiled by Tru64 cc)
authorRoger Sayle <roger@eyesopen.com>
Fri, 17 Feb 2006 01:13:38 +0000 (01:13 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Fri, 17 Feb 2006 01:13:38 +0000 (01:13 +0000)
2006-02-16  Roger Sayle  <roger@eyesopen.com>
    R. Scott Bailey  <scott.bailey@eds.com>
    Bill Northcott  <w.northcott@unsw.edu.au>

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

Co-Authored-By: Bill Northcott <w.northcott@unsw.edu.au>
Co-Authored-By: R. Scott Bailey <scott.bailey@eds.com>
From-SVN: r111172

libiberty/ChangeLog
libiberty/floatformat.c

index f0b0cec5e20eac5f6d6db9cb050119faa7720da2..b08419e4448224f8705c2b2c841428614f32327d 100644 (file)
@@ -1,3 +1,11 @@
+2006-02-16  Roger Sayle  <roger@eyesopen.com>
+           R. Scott Bailey  <scott.bailey@eds.com>
+           Bill Northcott  <w.northcott@unsw.edu.au>
+
+       PR bootstrap/16787
+       * floatformat.c: Include <float.h> where available.
+       (NAN): Use value of DBL_QNAN if defined, and NAN isn't.
+
 2006-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        Backport:
index a0f65354e4827b09f9a16e4d3f41994d4ea8f0c4..273edd750a9bcb0c6b6ca4bb6af550afc502e49c 100644 (file)
@@ -1,5 +1,6 @@
 /* IEEE floating point support routines, for GDB, the GNU Debugger.
-   Copyright (C) 1991, 1994, 1999, 2000, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1994, 1999, 2000, 2003, 2006
+   Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -30,6 +31,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #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"
@@ -43,8 +49,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #endif
 
 #ifndef NAN
+#ifdef DBL_QNAN
+#define NAN DBL_QNAN
+#else
 #define NAN (0.0 / 0.0)
 #endif
+#endif
 
 static unsigned long get_field PARAMS ((const unsigned char *,
                                        enum floatformat_byteorders,