This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: abs(long long)


On Wed, 3 Oct 2012, Gabriel Dos Reis wrote:

On Tue, Oct 2, 2012 at 1:53 PM, Marc Glisse <marc.glisse@inria.fr> wrote:

        * include/c_std/cstdlib (abs(long long)): Define with
        __builtin_llabs when we have long long.

(abs(__int128)): Define when we have __int128.

This change is OK

Thanks, I'll commit that part only.


(div(long long, long long)): Use lldiv.

not this one.

Ok. Note that glibc's implementation does more than just / and %. Possible reasons are:
1) glibc does useless work
2) libstdc++ has a bug
3) there are platforms supported by glibc but not by libstdc++


I choose to believe it is option 3.

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]