This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl-5.17.11 fails to build with x64 mingw64 (gcc-4.7.0)
authorSisyphus <sisyphus1@optusnet.com.au>
Sun, 21 Apr 2013 10:41:23 +0000 (03:41 -0700)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sun, 21 Apr 2013 21:22:39 +0000 (22:22 +0100)
# New Ticket Created by  "Sisyphus"
# Please include the string:  [perl #117687]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117687 >

This is a bug report for perl from sisyphus@OWNER-PC311012,
generated with the help of perlbug 1.39 running under perl 5.17.11.

-----------------------------------------------------------------
[Please describe your issue here]

This is essentially a repeat of a post sent to p5p on March 24 2013
titled "[Win32] perl-5.17.10 fails to build with x64 mingw64 (gcc-4.7.0)"

The issue still exists for 5.17.11 (for me).

The error I get is:

In file included from ../hv.h:570:0,
                 from ../perl.h:3480,
                 from perllib.c:10:
../hv_func.h: In function 'U32 S_perl_hash_murmur3(const unsigned char*,
const u
nsigned char*, STRLEN)':
../hv_func.h:395:20: error: cast from 'const unsigned char*' to 'long int'
loses
precision [-fpermissive]

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
hv_func.h

index 28b07b9..0a66356 100644 (file)
--- a/hv_func.h
+++ b/hv_func.h
@@ -392,7 +392,7 @@ S_perl_hash_murmur3(const unsigned char * const seed, const unsigned char *ptr,
     /* This CPU does not handle unaligned word access */
 
     /* Consume enough so that the next data byte is word aligned */
-    int i = -(long)ptr & 3;
+    int i = -(IV)ptr & 3;
     if(i && (STRLEN)i <= len) {
       MURMUR_DOBYTES(i, h1, carry, bytes_in_carry, ptr, len);
     }