Might you consider (I verified it works):
#if defined (_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4146) // unary minus operator applied to unsigned
type, result still unsigned
#endif
*__gmp_rp = (- *__gmp_up) & GMP_NUMB_MASK;
#if defined (_MSC_VER)
#pragma warning(pop)
#endif
Ciao,
Il 2022-03-13 00:06 Torbjörn Granlund ha scritto:
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,
Incidantally, arithmetic on unsigned types is well-defined. Unlike
that
of signed
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;
Ciao,
Il Gio, 3 Febbraio 2022 8:50 am, Niels Möller ha scritto:
> George Woltman writes:
>> I get this compiler warning calling mpz_tstbit: warning C4244:
>> 'argument':
>> conversion from 'uint64_t' to 'mp_bitcnt_t', possible loss of data
>> Yes, I'm creating mpz values with more than 4
Ciao,
Il Gio, 3 Febbraio 2022 8:50 am, Niels Möller ha scritto:
> George Woltman writes:
>> I get this compiler warning calling mpz_tstbit: warning C4244:
>> 'argument':
>> conversion from 'uint64_t' to 'mp_bitcnt_t', possible loss of data
>> Yes, I'm creating mpz values with more than 4
George Woltman writes:
> I've built the library (64-bit) using Cygwin. This creates a DLL and a
> gmp.h file that can be used with Microsoft Visual Studio C compiler.
> As you probably know, MSVC strangely defines long as 32-bits.
Hi, looking through old mail, sorry for the late reply.
> In
On Sun, Jan 16, 2022 at 9:24 PM George Woltman wrote:
> The problem is that while _LONG_LONG_LIMB is defined, the definition of
> mp_bitcnt_t ought to also use "long long".
> I get this compiler warning calling mpz_tstbit: warning C4244: 'argument':
> conversion from 'uint64_t' to
Hi,
I'm using GMP 6.2. Has been working fine for 2+ years now, great library.
I've built the library (64-bit) using Cygwin. This creates a DLL and a
gmp.h file that can be used with Microsoft Visual Studio C compiler.
As you probably know, MSVC strangely defines long as 32-bits.
In gmp.h,
10 matches
Mail list logo