aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2008-05-23 10:03:31 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2008-05-23 10:03:31 +0000
commitebd15f806619924c25f564330c5dd1a4ec39fad2 (patch)
tree42107618884077f6290067930b6e9d544d1fefd2
parent922e3e33b211d1f01056457b093c8196aff40333 (diff)
downloadgcc-ebd15f806619924c25f564330c5dd1a4ec39fad2.zip
gcc-ebd15f806619924c25f564330c5dd1a4ec39fad2.tar.gz
gcc-ebd15f806619924c25f564330c5dd1a4ec39fad2.tar.bz2
cmath (fpclassify): Use __builtin_fpclassify.
2008-05-23 Paolo Carlini <paolo.carlini@oracle.com> * include/c_std/cmath (fpclassify): Use __builtin_fpclassify. * include/c_global/cmath (fpclassify): Likewise. From-SVN: r135795
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/c_global/cmath13
-rw-r--r--libstdc++-v3/include/c_std/cmath13
3 files changed, 11 insertions, 20 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index dac9a8a..d2ac4e2 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/c_std/cmath (fpclassify): Use __builtin_fpclassify.
+ * include/c_global/cmath (fpclassify): Likewise.
+
2008-05-22 Paolo Carlini <paolo.carlini@oracle.com>
* include/tr1_impl/hashtable_policy.h (_Map_base<,,
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath
index f7be4d0..fad38e2 100644
--- a/libstdc++-v3/include/c_global/cmath
+++ b/libstdc++-v3/include/c_global/cmath
@@ -1,7 +1,7 @@
// -*- C++ -*- C forwarding header.
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -480,14 +480,6 @@ _GLIBCXX_END_NAMESPACE
// conformance, remove possible C99-injected names from the global
// namespace, and sequester them in the __gnu_cxx extension namespace.
-_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-
- template<typename _Tp>
- inline int
- __capture_fpclassify(_Tp __f) { return fpclassify(__f); }
-
-_GLIBCXX_END_NAMESPACE
-
// Only undefine the C99 FP macros, if actually captured for namespace movement
#undef fpclassify
#undef isfinite
@@ -510,7 +502,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
fpclassify(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
- return ::__gnu_cxx::__capture_fpclassify(__type(__f));
+ return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
+ FP_SUBNORMAL, FP_ZERO, __type(__f));
}
template<typename _Tp>
diff --git a/libstdc++-v3/include/c_std/cmath b/libstdc++-v3/include/c_std/cmath
index 52c1d2a..cc26880 100644
--- a/libstdc++-v3/include/c_std/cmath
+++ b/libstdc++-v3/include/c_std/cmath
@@ -1,7 +1,7 @@
// -*- C++ -*- C forwarding header.
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -462,14 +462,6 @@ _GLIBCXX_END_NAMESPACE
// conformance, remove possible C99-injected names from the global
// namespace, and sequester them in the __gnu_cxx extension namespace.
-_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-
- template<typename _Tp>
- inline int
- __capture_fpclassify(_Tp __f) { return fpclassify(__f); }
-
-_GLIBCXX_END_NAMESPACE
-
// Only undefine the C99 FP macros, if actually captured for namespace movement
#undef fpclassify
#undef isfinite
@@ -492,7 +484,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
fpclassify(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
- return ::__gnu_cxx::__capture_fpclassify(__type(__f));
+ return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
+ FP_SUBNORMAL, FP_ZERO, __type(__f));
}
template<typename _Tp>