about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-09-12 17:11:45 -0500
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-09-20 14:37:41 -0500
commitfc7f4691d331acb206c9be2643fc2572eabac0e1 (patch)
treece1780079b58bba2560b0e7f7d5e05554786f40b
parent9f9834f582f87cc84bfaa11cff5f98fb661c288d (diff)
downloadglibc-fc7f4691d331acb206c9be2643fc2572eabac0e1.tar.gz
glibc-fc7f4691d331acb206c9be2643fc2572eabac0e1.tar.xz
glibc-fc7f4691d331acb206c9be2643fc2572eabac0e1.zip
Remove __nan{f,,l} macros
Use the GCC builtin instead.  With the exception of the
files built from a template, they are unused.  This
is preparation for making the s_nanF objects generated.
-rw-r--r--ChangeLog11
-rw-r--r--math/s_nan.c1
-rw-r--r--math/s_nanf.c1
-rw-r--r--math/s_nanl.c1
-rw-r--r--sysdeps/generic/math-type-macros.h2
-rw-r--r--sysdeps/generic/math_private.h7
6 files changed, 12 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index d68dfed061..8423f60979 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2016-09-20  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
 
+	* math/s_nanf.c: Remove __nanf undef.
+	* math/s_nan.c: Remove __nan undef.
+	* math/s_nanl.c: Remove __nanl undef.
+
+	* sysdeps/generic/math_private.h (__nan): Remove macro
+	override.
+	(__nanf): Likewise.
+	(__nanl): Likewise.
+
+2016-09-20  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
+
 	* math/Makefile (gen-all-calls): New variable.
 	(generated): Replace gen-libm-calls with gen-all-calls.
 	(gen-libm-templates.stmp): Likewise.  Also, ensure
diff --git a/math/s_nan.c b/math/s_nan.c
index d9af7752ce..03e95f56ad 100644
--- a/math/s_nan.c
+++ b/math/s_nan.c
@@ -24,7 +24,6 @@
 #include <ieee754.h>
 
 
-#undef __nan
 double
 __nan (const char *tagp)
 {
diff --git a/math/s_nanf.c b/math/s_nanf.c
index 0dd6778f67..3046720a11 100644
--- a/math/s_nanf.c
+++ b/math/s_nanf.c
@@ -24,7 +24,6 @@
 #include <ieee754.h>
 
 
-#undef __nanf
 float
 __nanf (const char *tagp)
 {
diff --git a/math/s_nanl.c b/math/s_nanl.c
index e6149bc0c7..4b7b3d563c 100644
--- a/math/s_nanl.c
+++ b/math/s_nanl.c
@@ -24,7 +24,6 @@
 #include <ieee754.h>
 
 
-#undef __nanl
 long double
 __nanl (const char *tagp)
 {
diff --git a/sysdeps/generic/math-type-macros.h b/sysdeps/generic/math-type-macros.h
index bd9e25a816..78b883c877 100644
--- a/sysdeps/generic/math-type-macros.h
+++ b/sysdeps/generic/math-type-macros.h
@@ -74,7 +74,7 @@
 #define __M_CONCAT(a,b) a ## b
 #define __M_CONCATX(a,b) __M_CONCAT(a,b)
 
-#define M_NAN M_SUF (__nan) ("")
+#define M_NAN M_SUF (__builtin_nan) ("")
 #define M_MAX_EXP __M_CONCATX (M_PFX, _MAX_EXP)
 #define M_MIN __M_CONCATX (M_PFX, _MIN)
 #define M_MAX __M_CONCATX (M_PFX, _MAX)
diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h
index 24adcfb433..28e5df0a24 100644
--- a/sysdeps/generic/math_private.h
+++ b/sysdeps/generic/math_private.h
@@ -775,11 +775,4 @@ libc_feresetround_noex_ctx (struct rm_ctx *ctx)
   SET_RESTORE_ROUND_GENERIC (RM, libc_feholdsetround_53bit,	      \
 			     libc_feresetround_53bit)
 
-#define __nan(str) \
-  (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str))
-#define __nanf(str) \
-  (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str))
-#define __nanl(str) \
-  (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str))
-
 #endif /* _MATH_PRIVATE_H_ */