This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
dont use a 64 bit constant for a 32 bit value
authorDaniel Dragan <bulk88@hotmail.com>
Tue, 19 May 2015 05:23:29 +0000 (01:23 -0400)
committerSteve Hay <steve.m.hay@googlemail.com>
Tue, 19 May 2015 07:20:47 +0000 (08:20 +0100)
Perl on MSVC6 doesnt support 64 bit ints (p5p choice not to support it)
so this macro isn't defined on MSVC6 builds, commit e59642234e hid this
mistake from non-DEBUGGING builds. The mistake is a copy paste mistake
from commit eacbb37937 . Miniperl fails at VC6 link time due to UINT64_C
symboil not being found.

..\pad.c(165) : warning C4013: 'UINT64_C' undefined; assuming extern
returning int
..\pad.c(165) : warning C4018: '!=' : signed/unsigned mismatch

pad.c

diff --git a/pad.c b/pad.c
index ad1fc85..f5ce5f5 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -162,7 +162,7 @@ Perl_set_padlist(CV * cv, PADLIST *padlist){
 #  if PTRSIZE == 8
     assert((Size_t)padlist != UINT64_C(0xEFEFEFEFEFEFEFEF));
 #  elif PTRSIZE == 4
-    assert((Size_t)padlist != UINT64_C(0xEFEFEFEF));
+    assert((Size_t)padlist != 0xEFEFEFEF);
 #  else
 #    error unknown pointer size
 #  endif