[Bug target/54686] std::abs (long long) resorts to std::abs (double) if llabs is absent

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Sep 23 23:02:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54686

--- Comment #18 from Marc Glisse <glisse at gcc dot gnu.org> 2012-09-23 23:01:40 UTC ---
(In reply to comment #16)
> I also note that so far we added the long long overloads only in C++11 mode. I
> know that elsewhere in the library we have long long overloads in C++98 mode
> too as extensions, but then maybe better wrapping in _GLIBCXX_USE_LONG_LONG?

If someone calls abs on a long long in C++98, does that mean they will silently
use the double version? I saw some other places in the library that used long
long without any macro protection, so I did the same.

I really don't know what's best, I don't understand those weird macros, it is
your call.



More information about the Gcc-bugs mailing list