[Bug target/54686] std::abs (long long) resorts to std::abs (double) if llabs is absent
olegendo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 23 21:14:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54686
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |sh*-*-*
CC| |kkojima at gcc dot gnu.org
--- Comment #6 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-09-23 21:13:55 UTC ---
(In reply to comment #1)
> Note that the abs(long) and abs(long long) overloads, which you probably want
> around, are actually declared in <cstdlib>, which you are not including
> (-std=c++11 of course). Otherwise, <cstdlib>, which is available only because
> is included as an implementation detail, is fine per the Standard, any integer
> is supposed to unconditionally become double.
Brilliant! ;)
>
> But indeed you are right that long term you want <cstdint> to be non empty for
> SH. That shouldn't be too hard to implement, there is already very solid
> infrastructure for that (as an header installed by GCC, I mean). This is a
> target issue, really.
(In reply to comment #3)
> Actually, <cstdlib> is normally included by <algorithm> as an implementation
> detail, thus I suspect the C++11 bits in <cstdlib> are also disabled for this
> target.
Yeah, seems like that.
> Looks like the target maintainers need some serious pinging ;)
Probably this is due to newlib-bleh. I'm not testing sh-linux, but I would
assume that glibc does the right thing there. Kaz, just in case, could you
please check this on sh-linux?
More information about the Gcc-bugs
mailing list