unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Zheng <chriszheng99@gmail.com>
To: 34106@debbugs.gnu.org
Subject: bug#34106: 27.0.50; master build failed with MSYS2/MinGW-w64
Date: Thu, 17 Jan 2019 01:28:26 +0800	[thread overview]
Message-ID: <20190116172826.GA8756@Kael> (raw)


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





             reply	other threads:[~2019-01-16 17:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 17:28 Chris Zheng [this message]
2019-01-16 17:44 ` bug#34106: 27.0.50; master build failed with MSYS2/MinGW-w64 Andy Moreton
2019-01-16 18:06   ` Eli Zaretskii
     [not found] ` <handler.34106.D34106.15476619845997.notifdone@debbugs.gnu.org>
2019-01-17  5:54   ` Chris Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190116172826.GA8756@Kael \
    --to=chriszheng99@gmail.com \
    --cc=34106@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).