Hello,

the documentation for mpz_gcd_ui(rop, op1, op2) says "If rop is not NULL, store the result there." and indeed the main code contains two tests "if (w != NULL)". However, mpz_gcd_ui also contains special code for the case where op2 (an unsigned long) does not fit in a limb. And that code calls mpz_gcd without checking if the first argument is NULL. That probably does not affect any platform, since nails are not supported and I don't see anything defining __GMP_SHORT_LIMB.

--
Marc Glisse
_______________________________________________
gmp-bugs mailing list
[email protected]
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to