Re: 6.2.1 Bus error

2023-02-13 Thread guoyizhang
Hello I have reported the OS (ArchLinux) which only runs on the x86_64 machine. For the building issue for GNU MP, I am not familiar with it considering that it's just the dependency of amberol (see the GitLab issue https://gitlab.gnome.org/World/amberol/-/issues/289) I already asked the

Re: issue with Microsoft compiler

2023-02-13 Thread sisyphus
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

Re: issue with Microsoft compiler

2023-02-13 Thread Vincent Lefevre
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

Re: issue with Microsoft compiler

2023-02-13 Thread Vincent Lefevre
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

Re: issue with Microsoft compiler

2023-02-13 Thread Marc Glisse
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

Re: issue with Microsoft compiler

2023-02-13 Thread Niels Möller
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

Re: issue with Microsoft compiler

2023-02-13 Thread Marc Glisse
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

Re: issue with Microsoft compiler

2023-02-13 Thread Niels Möller
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

Re: issue with Microsoft compiler

2023-02-13 Thread Marc Glisse
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

issue with Microsoft compiler

2023-02-13 Thread Paul Zimmermann
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,