GNU bug report logs -
#34106
27.0.50; master build failed with MSYS2/MinGW-w64
Previous Next
Reported by: Chris Zheng <chriszheng99 <at> gmail.com>
Date: Wed, 16 Jan 2019 17:29:01 UTC
Severity: normal
Found in version 27.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
When build master branch under MS-Windows I’m seeing this
CC pdumper.o
pdumper.c: In function 'dump_cold_bignum':
pdumper.c:3447:53: error: conversion from 'size_t' {aka 'long long unsigned int'} to 'mp_size_t' {aka 'long int'} may change value [-Werror=conversion]
mp_limb_t limb = mpz_getlimbn (bignum->value, i);
cc1.exe: some warnings being treated as errors
Because with MSYS2/MinGW-w64 the `long' is 32-bit instead of 64-bit.
A explicit cast can fix it.
diff --git a/src/pdumper.c b/src/pdumper.c
index 3787408e6d..9d5ace6c38 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -3444,7 +3444,7 @@ dump_cold_bignum (struct dump_context *ctx, Lisp_Object object)
Fputhash (object, descriptor, ctx->bignum_data);
for (size_t i = 0; i < nlimbs; ++i)
{
- mp_limb_t limb = mpz_getlimbn (bignum->value, i);
+ mp_limb_t limb = mpz_getlimbn (bignum->value, (mp_size_t) i);
dump_write (ctx, &limb, sizeof (limb));
}
}
Thank you,
Chris
This bug report was last modified 6 years and 187 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.