summary refs log tree commit diff
path: root/sysdeps/mips/bits/nan.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mips/bits/nan.h')
-rw-r--r--sysdeps/mips/bits/nan.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/mips/bits/nan.h b/sysdeps/mips/bits/nan.h
index 193ab3ccad..baaaa551fb 100644
--- a/sysdeps/mips/bits/nan.h
+++ b/sysdeps/mips/bits/nan.h
@@ -1,5 +1,6 @@
 /* `NAN' constant for IEEE 754 machines.
-   Copyright (C) 1992, 1996, 1997, 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1996, 1997, 1999, 2002, 2004
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +28,11 @@
    the definition of this open to implementations, and for MIPS the top
    bit of the mantissa must be SET to indicate a SNaN.  */
 
-#ifdef	__GNUC__
+#if __GNUC_PREREQ(3,3)
+
+# define NAN	(__builtin_nanf(""))
+
+#elif defined __GNUC__
 
 # define NAN \
   (__extension__                                                            \