Hi Paul,
Before including gmp.h, try:
#pragma warning(disable:4146)
That works for me with compiler version 19.33.31630 for x64.
Cheers,
Rob
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
On 2023-02-13 11:54:50 +0100, Marc Glisse wrote:
> Another option, if it is just the one place in gmp.h, would be to replace -X
> with 0-X (or the uglier ~X+1 but that does not seem necessary).
I find 0-X much uglier and it could even more deserve a warning due to
the use of mixed signed-unsigned
On 2023-02-13 10:20:07 +0100, Marc Glisse wrote:
> On Mon, 13 Feb 2023, Niels Möller wrote:
> > My view is that GMP simply depends on the required semantics of the C
> > specification. And negating mp_limb_t values is something that's done in
> > lots of places. I'm not aware of any workaround tha
On Mon, 13 Feb 2023, Niels Möller wrote:
I got the impression that someone was building GMP with -Werror.
Then I agree that it is their problem.
Getting this by just *using* gmp and including gmp.h is
a different setting with different tradeoffs.
It might make some sense to add something l
Marc Glisse writes:
> I think changing it in public headers (gmp.h, gmpxx.h) is the
> important part, changing it in internal source files is less of an
> issue.
Good point. I got the impression that someone was building GMP with
-Werror. Getting this by just *using* gmp and including gmp.h is
a
On Mon, 13 Feb 2023, Niels Möller wrote:
Marc Glisse writes:
It is certainly possible to avoid the warning, either with a pragma or
with different code, but until now, the policy has been to tell people
to disable this non-sensical behavior in visual studio or use a better
compiler. I don't
Marc Glisse writes:
> It is certainly possible to avoid the warning, either with a pragma or
> with different code, but until now, the policy has been to tell people
> to disable this non-sensical behavior in visual studio or use a better
> compiler. I don't have a strong opinion here.
My view i
On Mon, 13 Feb 2023, Paul Zimmermann wrote:
Hi,
someone reported to me the following issue:
Microsoft (R) C/C++ Optimizing Compiler Version 19.34.31937 for x64
will not compile line 2230 in gmp.h:
*__gmp_rp = (- *__gmp_up) & GMP_NUMB_MASK;
giving error C4146: unary minus op
Hi,
someone reported to me the following issue:
Microsoft (R) C/C++ Optimizing Compiler Version 19.34.31937 for x64
will not compile line 2230 in gmp.h:
*__gmp_rp = (- *__gmp_up) & GMP_NUMB_MASK;
giving error C4146: unary minus operator applied to unsigned type,
resul