[Bug target/54686] std::abs (long long) resorts to std::abs (double) if llabs is absent
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Sun Sep 23 20:42:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54686
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-09-23
CC| |paolo.carlini at oracle dot
| |com
Component|libstdc++ |target
Ever Confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-09-23 20:42:34 UTC ---
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.
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.
More information about the Gcc-bugs
mailing list