aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/c_global/cmath
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/c_global/cmath')
-rw-r--r--libstdc++-v3/include/c_global/cmath6
1 files changed, 5 insertions, 1 deletions
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath
index 4cafe5f7fe3..d3fc8b7f39c 100644
--- a/libstdc++-v3/include/c_global/cmath
+++ b/libstdc++-v3/include/c_global/cmath
@@ -880,7 +880,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
signbit(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
- return __builtin_signbit(__type(__f));
+ return sizeof(__type) == sizeof(float)
+ ? __builtin_signbitf(__type(__f))
+ : sizeof(__type) == sizeof(double)
+ ? __builtin_signbit(__type(__f))
+ : __builtin_signbitl(__type(__f));
}
template<typename _Tp>