Warning when using gmp 64 bits in vcpkg

William Galway galwaymath at gmail.com
Mon Mar 1 16:31:33 UTC 2021


I suggest that Cristofer submit the information requested in the manual:
  https://gmplib.org/manual/Reporting-Bugs

In particular, they should send
 * The version of gmp they are using.
 * The output produced by running './configure', when building gmp.  They
should show
   any options that they may have passed to 'configure'.
 * The name and version of the compiler.  For gcc this can be found with
the command
   'gcc -v'.
 * The output from running 'uname -a'

In short, please provide the information that would let someone reproduce
the error message.

As Torbjörn pointed out, the error message is not a bug, and you can safely
ignore that particular message.

-- Regards, Will



On Sun, Feb 28, 2021 at 3:46 PM Torbjörn Granlund <tg at gmplib.org> wrote:

> Cristofer Martins <CristoferMartins at hotmail.com> writes:
>
>   The warning is as follows(MSVC) "warning C4146: unary minus operator
>   applied to unsigned type, result still unsigned"
>   Line 2240 inside gmp.h code "*__gmp_rp = (- *__gmp_up) & GMP_NUMB_MASK;"
>   I hope its fixed since its create warnings for all files that includes
> gmp.h
>
> No this is not "fixed" in GMP.  Negation is completely well-defined for
> unsigned types.  If some compiler warns about negation, use a better
> compiler, or else try to disable this bogus warning.
>
> --
> Torbjörn
> Please encrypt, key id 0xC8601622
> _______________________________________________
> gmp-bugs mailing list
> gmp-bugs at gmplib.org
>
> https://urldefense.com/v3/__https://gmplib.org/mailman/listinfo/gmp-bugs__;!!DZ3fjg!p6IWytTG6hST2TPjuU82d4yfvzAZqAcLEtowycT3NDb5HDzQ99Wy-G8QghJNIaW1EbU$
>


More information about the gmp-bugs mailing list