There is some sort of sick competition between certain compilers to have
the most warnings for valid C. I don't think we should play their game,
and as a result obfuscate the GMP sources.
Incidantally, arithmetic on unsigned types is well-defined. Unlike that
of signed types.
Should not
Marco Bodrato writes:
- *__gmp_rp = (- *__gmp_up) & GMP_NUMB_MASK;
+ *__gmp_rp = (1 + ~ *__gmp_up) & GMP_NUMB_MASK;
Let's please not do this.
There is some sort of sick competition between certain compilers to have
the most warnings for valid C. I don't think we should play their game,
Ciao,
Il 2022-02-03 08:50 ni...@lysator.liu.se ha scritto:
George Woltman writes:
Minor issue #2 (I should have reported this years ago, sorry):
In gmp.h, these lines:
mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n)
[...]
*__gmp_rp = (- *__gmp_up) & GMP_NUMB_MASK;