Tried to compile MPIR, got 602 warnings

46 views
Skip to first unread message

batibix

unread,
Mar 6, 2011, 7:43:58 AM3/6/11
to mpir-devel
I'm trying to compile MPIR 2.3.0 (dll_mpir_gc) for windows (config:
x64, release) in VS2010 Professional, and get 602 warnings. Most of
them are about possible precision loss, e.g. "warning C4244: '=' :
conversion from 'mp_bitcnt_t' to 'unsigned long', possible loss of
data". Is this normal and to be expected when compiling this lib?

Cactus

unread,
Mar 6, 2011, 11:46:47 AM3/6/11
to mpir-devel
The short answer is 'yes'.

These are mostly caused by the fact that getting a 64-bit integer on
WIndows requires a long long type whereas the code is written with the
assumption that 32 (64) bit systems have 32 (64) bit systems.

In an ideal world we would remove these potential problems by making
all integers consistent in length but this would be very time
consuming since the issue iw endemic in the code.

Brian


Cactus

unread,
Mar 6, 2011, 11:48:28 AM3/6/11
to mpir-devel
oops, that should have read "32 (64) bit systems have 32 (64) bit
integers'

batibix

unread,
Mar 6, 2011, 5:56:40 PM3/6/11
to mpir-devel
> > The short answer is 'yes'.

Thanks, now I can go ahead and move my GMP 32 bit code to MPIR and the
joys of 64 bit performance :).
Reply all
Reply to author
Forward
0 new messages