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

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #5)
> 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,

Yes, we can't really remove it now, we have no idea how much code is using it.

> it would seem easier to share the code
> with C++11, no?

Maybe. Since I don't plan to change trunk (because the c++98 signbit function
template works correctly there) I wanted to make a less obtrusive change than
replacing the existing function with the c++11 versions. By just fixing the
body we don't change what is declared, we just make it work correctly.

Just sharing the code with C++11 might not be straightforward, because I don't
know if Solaris 12 declares std::signbit for C++98 mode. If it doesn't, then we
can't just reuse the same code, because that code relies on declarations in
Solaris' <math.h>

That might not be a problem, if _GLIBCXX_USE_C99_MATH is not declared for
Solaris 12, because we wouldn't declare std::signbit at all in c++98 mode ...
but I don't know, and would rather not take risks or require new configure
checks on the stable 4.9 and 5 release branches.

Reply via email to