issue with Microsoft compiler

Vincent Lefevre vincent at vinc17.net
Mon Feb 13 12:21:02 CET 2023


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 arithmetic, which can often lead to
unexpected results on some platforms (e.g. whether long = int or not).

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list