http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54686
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> 2012-09-23 21:00:00 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). In cstdlib, it would be possible to have abs(long long) protected by the simpler _GLIBCXX_USE_LONG_LONG instead of the full _GLIBCXX_USE_C99 (it only requires language support and not C library support), or even not protected at all (there are other places in the library that assume long long exists). There could also be an __int128 version. > 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. Er, abs is the exception there. signed integers have their own overloads of abs (in cstdlib). Seems like only unsigned integers get converted to double, which is rather funny :-) Not sure that was intentional in the standard...