mpz_set_si loses long long value on Windows

Torbjörn Granlund tg at gmplib.org
Wed Jul 24 09:29:42 UTC 2019


Vincent Lefevre <vincent at vinc17.net> writes:

  GNU MPFR has mpfr_set_sj and mpfr_set_uj (when intmax_t is available)
  in addition to mpfr_set_si and mpfr_set_ui.

  Perhaps it could be nice for GMP to also have mpz_set_sj and
  mpz_set_uj in addition to mpz_set_si and mpz_set_ui.

I have a probably incomplete patch for accepting long long with _uj.
The problem with MPFR's approach is that the library API depends on the
compiler.

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

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-bugs mailing list