https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60637

--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> I think we can fix the C++98 std::signbit(_Tp) with:
> 
>       typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
>       return sizeof(__type) == sizeof(long double)
>       ? __builtin_signbitl(__type(__f))
>       : sizeof(__type) == sizeof(double)
>       ? __builtin_signbit(__type(__f))
>       : __builtin_signbitf(__type(__f));

Why do you want to use a different code for C++98 and C++11? The best solution
would be to remove the declaration in C++98, since it is not standard, but if
we have to keep it, it would seem easier to share the code with C++11, no?

Reply via email to