A little warning in GMP.h

Brian Gladman brg at gladman.plus.com
Wed Sep 22 21:10:02 CEST 2004


Francesco Montorsi wrote:
> Hi,
>   I'm using GMP with various win32 compilers and I've found that most of them report a warning like this about gmp.h:
> 
> c:\gmp\gmp.h(1599) : warning C4146: unary minus operator applied to unsigned type, result still unsigned

Since this warning is numbered 4146 on the Microsoft VC++ compiler, I am 
guessing that you might be using this.

If so you may wish to know that this warning can be easily turned off by 
adding:

#ifdef _MSC_VER
#  pragma warning( disable : 4146 )
#endif

at an appropriate point in your code.

    Brian Gladman



More information about the gmp-discuss mailing list