mpz_set_si loses long long value on Windows

Vincent Lefevre vincent at vinc17.net
Wed Jul 24 11:27:22 UTC 2019


On 2019-07-24 11:29:42 +0200, Torbjorn Granlund wrote:
> The problem with MPFR's approach is that the library API depends on the
> compiler.

Yes, but note that this is also the case with GMP, for the
formatted output functions. :)

> (We could solve that issue by rejecting pre-C99 compilers.  GMP
> currently is C90. Your intmax_t is also C99.)

For GMP and formatted output functions:

     h         short
     hh        char
     j         intmax_t or uintmax_t
     l         long or wchar_t
     ll        long long
     L         long double
     q         quad_t or u_quad_t
     t         ptrdiff_t
     z         size_t

quad_t isn't even in C99.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list