Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^11: supporting quads on 32 bit Perl

by bulk88 (Priest)
on Jun 02, 2012 at 21:39 UTC ( [id://974059]=note: print w/replies, xml ) Need Help??


in reply to Re^10: supporting quads on 32 bit Perl
in thread supporting quads on 32 bit Perl

Things are better, your github int64.xs compiled and nmake test passed.
C:\Documents and Settings\Owner\Desktop\cpan libs\Math-Int64-0.19>nmak +e test Microsoft (R) Program Maintenance Utility Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. C:\perl512\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib\lib', 'blib\arch')" t/*.t t/as_int64.t ............ ok t/die_on_overflow.t ..... ok t/Math-Int64-Native.t ... ok t/Math-Int64.t .......... ok t/Math-UInt64-Native.t .. ok t/Math-UInt64.t ......... ok t/pods.t ................ skipped: Only the author needs to check that + POD docs are right All tests successful. Files=7, Tests=241, 1 wallclock secs ( 0.12 usr + 0.05 sys = 0.17 C +PU) Result: PASS C:\Documents and Settings\Owner\Desktop\cpan libs\Math-Int64-0.19>
But the build was very noisy.
cp lib/Math/Int64.pm blib\lib\Math\Int64.pm cp lib/Math/Int64/die_on_overflow.pm blib\lib\Math\Int64\die_on_overfl +ow.pm cp lib/Math/Int64/native_if_available.pm blib\lib\Math\Int64\native_if +_available.pm C:\perl512\bin\perl.exe C:\perl512\lib\ExtUtils\xsubpp -typemap C +:\perl512\lib\ExtUtils\typemap Int64.xs > Int64.xsc && C:\perl512\bi +n\perl.exe -MExtUtils::Command -e "mv" -- Int64.xsc Int64.c cl -c -I. -nologo -GF -W3 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CON +SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMP +LICIT_SYS -DUSE_PERLIO -Od -MD -Zi -DDEBUGGING -DVERSION=\"0.19\" + -DXS_VERSION=\"0.19\" "-IC:\perl512\lib\CORE" -DINT64_BACKEND_NV I +nt64.c Int64.c Int64.xs(253) : warning C4244: 'initializing' : conversion from 'NV' t +o 'int64_t', possible loss of data Int64.xs(259) : warning C4244: 'return' : conversion from 'NV' to 'int +64_t', possible loss of data Int64.xs(339) : warning C4244: 'initializing' : conversion from 'NV' t +o 'uint64_t', possible loss of data Int64.xs(345) : warning C4244: 'return' : conversion from 'NV' to 'uin +t64_t', possible loss of data Int64.xs(355) : warning C4244: 'initializing' : conversion from 'int64 +_t' to 'IV', possible loss of data Int64.xs(360) : warning C4244: 'initializing' : conversion from 'int64 +_t' to 'UV', possible loss of data Int64.xs(364) : warning C4244: 'function' : conversion from 'int64_t' +to 'const NV', possible loss of data Int64.xs(370) : warning C4244: 'initializing' : conversion from 'uint6 +4_t' to 'UV', possible loss of data Int64.xs(373) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const NV', possible loss of data Int64.xs(385) : warning C4244: 'initializing' : conversion from 'uint6 +4_t' to 'char', possible loss of data Int64.xs(502) : warning C4244: 'function' : conversion from 'int64_t' +to 'const IV', possible loss of data Int64.xs(526) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const UV', possible loss of data Int64.xs(545) : warning C4244: '=' : conversion from 'int64_t' to 'cha +r', possible loss of data Int64.xs(563) : warning C4244: '=' : conversion from 'uint64_t' to 'ch +ar', possible loss of data Int64.xs(679) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const IV', possible loss of data Int64.xs(690) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const UV', possible loss of data Int64.xs(700) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const IV', possible loss of data Int64.xs(710) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const UV', possible loss of data Int64.xs(722) : warning C4244: 'function' : conversion from 'int64_t' +to 'const IV', possible loss of data Int64.xs(733) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const IV', possible loss of data Int64.xs(756) : warning C4554: '<<' : check operator precedence for po +ssible error; use parentheses to clarify precedence Int64.c(1262) : warning C4101: 'rev' : unreferenced local variable Int64.c(1261) : warning C4101: 'other' : unreferenced local variable Int64.c(1290) : warning C4101: 'rev' : unreferenced local variable Int64.c(1289) : warning C4101: 'other' : unreferenced local variable Int64.c(1679) : warning C4101: 'rev' : unreferenced local variable Int64.c(1706) : warning C4101: 'rev' : unreferenced local variable Int64.c(1938) : warning C4101: 'rev' : unreferenced local variable Int64.c(1937) : warning C4101: 'other' : unreferenced local variable Int64.c(1963) : warning C4101: 'rev' : unreferenced local variable Int64.c(1962) : warning C4101: 'other' : unreferenced local variable Int64.c(1988) : warning C4101: 'rev' : unreferenced local variable Int64.c(1987) : warning C4101: 'other' : unreferenced local variable Int64.c(2013) : warning C4101: 'rev' : unreferenced local variable Int64.c(2012) : warning C4101: 'other' : unreferenced local variable Int64.c(2038) : warning C4101: 'rev' : unreferenced local variable Int64.c(2037) : warning C4101: 'other' : unreferenced local variable Int64.c(2063) : warning C4101: 'rev' : unreferenced local variable Int64.c(2062) : warning C4101: 'other' : unreferenced local variable Int64.c(2088) : warning C4101: 'rev' : unreferenced local variable Int64.c(2087) : warning C4101: 'other' : unreferenced local variable Int64.c(2113) : warning C4101: 'rev' : unreferenced local variable Int64.c(2112) : warning C4101: 'other' : unreferenced local variable Int64.c(2140) : warning C4101: 'rev' : unreferenced local variable Int64.c(2139) : warning C4101: 'other' : unreferenced local variable Int64.c(2505) : warning C4101: 'rev' : unreferenced local variable Int64.c(2532) : warning C4101: 'rev' : unreferenced local variable Int64.c(2764) : warning C4101: 'rev' : unreferenced local variable Int64.c(2763) : warning C4101: 'other' : unreferenced local variable Int64.c(2789) : warning C4101: 'rev' : unreferenced local variable Int64.c(2788) : warning C4101: 'other' : unreferenced local variable Int64.xs(1607) : warning C4146: unary minus operator applied to unsign +ed type, result still unsigned Int64.c(2814) : warning C4101: 'rev' : unreferenced local variable Int64.c(2813) : warning C4101: 'other' : unreferenced local variable Int64.c(2839) : warning C4101: 'rev' : unreferenced local variable Int64.c(2838) : warning C4101: 'other' : unreferenced local variable Int64.c(2864) : warning C4101: 'rev' : unreferenced local variable Int64.c(2863) : warning C4101: 'other' : unreferenced local variable Int64.c(2889) : warning C4101: 'rev' : unreferenced local variable Int64.c(2888) : warning C4101: 'other' : unreferenced local variable Int64.c(2914) : warning C4101: 'rev' : unreferenced local variable Int64.c(2913) : warning C4101: 'other' : unreferenced local variable c:\documents and settings\owner\desktop\cpan libs\math-int64-0.19\int6 +4.xs(602) : warning C4700: local variable 'RETVAL' used without havin +g been initialized c:\documents and settings\owner\desktop\cpan libs\math-int64-0.19\int6 +4.xs(167) : warning C4715: 'SvSI64' : not all control paths return a +value c:\documents and settings\owner\desktop\cpan libs\math-int64-0.19\int6 +4.xs(177) : warning C4715: 'SvSU64' : not all control paths return a +value Running Mkbootstrap for Math::Int64 () C:\perl512\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 Int6 +4.bs C:\perl512\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NA +ME'=>\"Math::Int64\", 'DLBASE' => 'Int64', 'DL_FUNCS' => { }, 'FUNCL +IST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" link -out:blib\arch\auto\Math\Int64\Int64.dll -dll -nologo -nodefa +ultlib -debug -libpath:"c:\perl512\lib\CORE" -machine:x86 Int64.obj + C:\perl512\lib\CORE\perl512.lib oldnames.lib kernel32.lib user32.l +ib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole3 +2.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.li +b version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib -def:I +nt64.def Creating library blib\arch\auto\Math\Int64\Int64.lib and object bli +b\arch\auto\Math\Int64\Int64.exp if exist blib\arch\auto\Math\Int64\Int64.dll.manifest mt -nologo - +manifest blib\arch\auto\Math\Int64\Int64.dll.manifest -outputresource +:blib\arch\auto\Math\Int64\Int64.dll;2 if exist blib\arch\auto\Math\Int64\Int64.dll.manifest del blib\arc +h\auto\Math\Int64\Int64.dll.manifest C:\perl512\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 blib +\arch\auto\Math\Int64\Int64.dll C:\perl512\bin\perl.exe -MExtUtils::Command -e "cp" -- Int64.bs bl +ib\arch\auto\Math\Int64\Int64.bs C:\perl512\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 blib +\arch\auto\Math\Int64\Int64.bs Files found in blib\arch: installing files in blib\lib into architectu +re dependent library tree Installing C:\perl512\site\lib\auto\Math\Int64\Int64.dll Installing C:\perl512\site\lib\auto\Math\Int64\Int64.exp Installing C:\perl512\site\lib\auto\Math\Int64\Int64.ilk Installing C:\perl512\site\lib\auto\Math\Int64\Int64.lib Installing C:\perl512\site\lib\auto\Math\Int64\Int64.pdb Appending installation info to c:\perl512\lib/perllocal.pod
I don't know if any of these warnings are errors or just forgotten casts yet.

edit: made a summary of the code thats causing all the warnings, 1 or 2 of them look like real bugs, my comments if any are all caps, >>>>>>> means the line the warning above is pointing to
cp lib/Math/Int64.pm blib\lib\Math\Int64.pm cp lib/Math/Int64/die_on_overflow.pm blib\lib\Math\Int64\die_on_overfl +ow.pm cp lib/Math/Int64/native_if_available.pm blib\lib\Math\Int64\native_if +_available.pm C:\perl512\bin\perl.exe C:\perl512\lib\ExtUtils\xsubpp -typemap C +:\perl512\lib\ExtUtils\typemap Int64.xs > Int64.xsc && C:\perl512\bi +n\perl.exe -MExtUtils::Command -e "mv" -- Int64.xsc Int64.c cl -c -I. -nologo -GF -W3 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CON +SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMP +LICIT_SYS -DUSE_PERLIO -Od -MD -Zi -DDEBUGGING -DVERSION=\"0.19\" + -DXS_VERSION=\"0.19\" "-IC:\perl512\lib\CORE" -DINT64_BACKEND_NV I +nt64.c Int64.c Int64.xs(253) : warning C4244: 'initializing' : conversion from 'NV' t +o 'int64_t', possible loss of data if (may_die_on_overflow) { #ifdef _MSC_VER >>>>>> int64_t i64 = nv; if ((NV)i64 != nv) overflow(aTHX_ out_of_bounds_error_s); #else if ((nv >= 0x1p63) || (nv < -0x1p63)) overflow(aTHX_ out_of_ +bounds_error_s); #endif Int64.xs(259) : warning C4244: 'return' : conversion from 'NV' to 'int +64_t', possible loss of data } >>>>>>> return nv; } } return strtoint64(aTHX_ SvPV_nolen(sv), 10, 1); Int64.xs(339) : warning C4244: 'initializing' : conversion from 'NV' t +o 'uint64_t', possible loss of data if (may_die_on_overflow) { #ifdef _MSC_VER >>>>>>>>>> uint64_t u64 = nv; if ((NV)u64 != nv) overflow(aTHX_ out_of_bounds_error_u); #else if ((nv < 0) || (nv >= 0x1p64)) overflow(aTHX_ out_of_bounds +_error_u); #endif Int64.xs(345) : warning C4244: 'return' : conversion from 'NV' to 'uin +t64_t', possible loss of data if ((nv < 0) || (nv >= 0x1p64)) overflow(aTHX_ out_of_bounds +_error_u); #endif } >>>>>>> return nv; } } Int64.xs(355) : warning C4244: 'initializing' : conversion from 'int64 +_t' to 'IV', possible loss of data static SV * si64_to_number(pTHX_ SV *sv) { int64_t i64 = SvI64(aTHX_ sv); if (i64 < 0) { >>>>>>>>>>> IV iv = i64; if (iv == i64) return newSViv(iv); Int64.xs(360) : warning C4244: 'initializing' : conversion from 'int64 +_t' to 'UV', possible loss of data } else { >>>>>>>>> UV uv = i64; if (uv == i64) return newSVuv(uv); } return newSVnv(i64); } Int64.xs(364) : warning C4244: 'function' : conversion from 'int64_t' +to 'const NV', possible loss of data UV uv = i64; if (uv == i64) return newSVuv(uv); } >>>>>>>>>>> return newSVnv(i64); } Int64.xs(370) : warning C4244: 'initializing' : conversion from 'uint6 +4_t' to 'UV', possible loss of data static SV * su64_to_number(pTHX_ SV *sv) { uint64_t u64 = SvU64(aTHX_ sv); >>>>>>>>> UV uv = u64; if (uv == u64) return newSVuv(uv); return newSVnv(u64); } Int64.xs(373) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const NV', possible loss of data static SV * su64_to_number(pTHX_ SV *sv) { uint64_t u64 = SvU64(aTHX_ sv); UV uv = u64; if (uv == u64) return newSVuv(uv); >>>>>>>>> return newSVnv(u64); } Int64.xs(385) : warning C4244: 'initializing' : conversion from 'uint6 +4_t' to 'char', possible loss of data static SV * u64_to_string_with_sign(pTHX_ uint64_t u64, int base, int sign) { char str[I64STRLEN]; int len = 0; if ((base > 36) || (base < 2)) Perl_croak(aTHX_ "base %d out of range [2,36]", base); while (u64) { >>>>>>>>>>>> char c = u64 % base; u64 /= base; str[len++] = c + (c > 9 ? 'A' - 10 : '0'); } Int64.xs(502) : warning C4244: 'function' : conversion from 'int64_t' +to 'const IV', possible loss of data SV * miu64_net_to_int64(net) SV *net; PREINIT: STRLEN len; unsigned char *pv = (unsigned char *)SvPV(net, len); int64_t i64; CODE: if (len != 8) Perl_croak(aTHX_ "Invalid length for int64"); i64 = (((((((((((((((int64_t)pv[0]) << 8) + (int64_t)pv[1]) << 8) + (int64_t)pv[2]) << 8) + (int64_t)pv[3]) << 8) + (int64_t)pv[4]) << 8) + (int64_t)pv[5]) << 8) + (int64_t)pv[6]) <<8) + (int64_t)pv[7]; RETVAL = ( use_native >>>>>>>>>>>>> ? newSViv(i64) : newSVi64(aTHX_ i64) ); OUTPUT: RETVAL Int64.xs(526) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const UV', possible loss of data SV * miu64_net_to_uint64(net) SV *net; PREINIT: STRLEN len; unsigned char *pv = (unsigned char *)SvPV(net, len); uint64_t u64; CODE: if (len != 8) Perl_croak(aTHX_ "Invalid length for uint64"); u64 = (((((((((((((((uint64_t)pv[0]) << 8) + (uint64_t)pv[1]) << 8) + (uint64_t)pv[2]) << 8) + (uint64_t)pv[3]) << 8) + (uint64_t)pv[4]) << 8) + (uint64_t)pv[5]) << 8) + (uint64_t)pv[6]) <<8) + (uint64_t)pv[7]; RETVAL = ( use_native >>>>>>>>>>>> ? newSVuv(u64) : newSVu64(aTHX_ u64) ); OUTPUT: RETVAL Int64.xs(545) : warning C4244: '=' : conversion from 'int64_t' to 'cha +r', possible loss of data SV * miu64_int64_to_net(self) SV *self PREINIT: char *pv; int64_t i64 = SvI64(aTHX_ self); int i; CODE: RETVAL = newSV(8); SvPOK_on(RETVAL); SvCUR_set(RETVAL, 8); pv = SvPVX(RETVAL); pv[8] = '\0'; for (i = 7; i >= 0; i--, i64 >>= 8) >>>>>>>>>> pv[i] = i64; OUTPUT: RETVAL Int64.xs(563) : warning C4244: '=' : conversion from 'uint64_t' to 'ch +ar', possible loss of data SV * miu64_uint64_to_net(self) SV *self PREINIT: char *pv; uint64_t u64 = SvU64(aTHX_ self); int i; CODE: RETVAL = newSV(8); SvPOK_on(RETVAL); SvCUR_set(RETVAL, 8); pv = SvPVX(RETVAL); pv[8] = '\0'; for (i = 7; i >= 0; i--, u64 >>= 8) >>>>>>>>>> pv[i] = u64; OUTPUT: RETVAL Int64.xs(679) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const IV', possible loss of data SV * miu64_string_to_int64(str, base = 0) const char *str; int base; CODE: RETVAL = ( use_native >>>>>>>>>>>> ? newSViv(strtoint64(aTHX_ str, base, 1)) : newSVi64(aTHX_ strtoint64(aTHX_ str, base, 1)) ); OUTPUT: RETVAL Int64.xs(690) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const UV', possible loss of data SV * miu64_string_to_uint64(str, base = 0) const char *str; int base; CODE: RETVAL = ( use_native >>>>>>>>>>>>>>> ? newSVuv(strtoint64(aTHX_ str, base, 0) +) : newSVu64(aTHX_ strtoint64(aTHX_ str, base, 0)) ); OUTPUT: RETVAL Int64.xs(700) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const IV', possible loss of data RETVAL SAME KIND AS ABOVE Int64.xs(710) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const UV', possible loss of data RETVAL SAME KIND AS ABOVE Int64.xs(722) : warning C4244: 'function' : conversion from 'int64_t' +to 'const IV', possible loss of data RETVAL SAME KIND AS ABOVE Int64.xs(733) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const IV', possible loss of data RETVAL SAME KIND AS ABOVE Int64.xs(756) : warning C4554: '<<' : check operator precedence for po +ssible error; use parentheses to clarify precedence /* make the seed endianness agnostic */ for (i = 0; i < RANDSIZ; i++) { char *p = shadow + i * sizeof(uint64_t); randrsl[i] = (((((((((((((uint64_t)p[0] << 8) + p[1]) << 8 +) + p[2]) << 8) + p[3]) << 8) + >>>>>>>>>>>>>>> p[4] << +8) + p[5]) << 8) + p[6]) << 8) + p[7]; } randinit(1); } Int64.c(1262) : warning C4101: 'rev' : unreferenced local variable Int64.c(1261) : warning C4101: 'other' : unreferenced local variable I GUESS ALL THE REV/OTHER ERRORS ARE THE SAME NOT SURE HOW TO SILENCE XS(XS_Math__Int64__inc); /* prototype to pass -Wmissing-prototypes */ XS(XS_Math__Int64__inc) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 3) croak_xs_usage(cv, "self, other, rev"); { SV * self = ST(0); SV * other; SV * rev; SV * RETVAL; #line 772 "Int64.xs" if (may_die_on_overflow && (SvI64x(self) == INT64_MAX)) overflow(a +THX_ inc_error); SvI64x(self)++; RETVAL = self; SvREFCNT_inc(RETVAL); #line 1270 "Int64.c" ST(0) = RETVAL; sv_2mortal(ST(0)); } XSRETURN(1); } Int64.c(1290) : warning C4101: 'rev' : unreferenced local variable Int64.c(1289) : warning C4101: 'other' : unreferenced local variable Int64.c(1679) : warning C4101: 'rev' : unreferenced local variable Int64.c(1706) : warning C4101: 'rev' : unreferenced local variable Int64.c(1938) : warning C4101: 'rev' : unreferenced local variable Int64.c(1937) : warning C4101: 'other' : unreferenced local variable Int64.c(1963) : warning C4101: 'rev' : unreferenced local variable Int64.c(1962) : warning C4101: 'other' : unreferenced local variable Int64.c(1988) : warning C4101: 'rev' : unreferenced local variable Int64.c(1987) : warning C4101: 'other' : unreferenced local variable Int64.c(2013) : warning C4101: 'rev' : unreferenced local variable Int64.c(2012) : warning C4101: 'other' : unreferenced local variable Int64.c(2038) : warning C4101: 'rev' : unreferenced local variable Int64.c(2037) : warning C4101: 'other' : unreferenced local variable Int64.c(2063) : warning C4101: 'rev' : unreferenced local variable Int64.c(2062) : warning C4101: 'other' : unreferenced local variable Int64.c(2088) : warning C4101: 'rev' : unreferenced local variable Int64.c(2087) : warning C4101: 'other' : unreferenced local variable Int64.c(2113) : warning C4101: 'rev' : unreferenced local variable Int64.c(2112) : warning C4101: 'other' : unreferenced local variable Int64.c(2140) : warning C4101: 'rev' : unreferenced local variable Int64.c(2139) : warning C4101: 'other' : unreferenced local variable Int64.c(2505) : warning C4101: 'rev' : unreferenced local variable Int64.c(2532) : warning C4101: 'rev' : unreferenced local variable Int64.c(2764) : warning C4101: 'rev' : unreferenced local variable Int64.c(2763) : warning C4101: 'other' : unreferenced local variable Int64.c(2789) : warning C4101: 'rev' : unreferenced local variable Int64.c(2788) : warning C4101: 'other' : unreferenced local variable Int64.xs(1607) : warning C4146: unary minus operator applied to unsign +ed type, result still unsigned SV * mu64_neg(self, other, rev) SV *self SV *other = NO_INIT SV *rev = NO_INIT CODE: >>>>>>>>>> RETVAL = newSVu64(aTHX_ -SvU64x(self)); OUTPUT: RETVAL Int64.c(2814) : warning C4101: 'rev' : unreferenced local variable Int64.c(2813) : warning C4101: 'other' : unreferenced local variable Int64.c(2839) : warning C4101: 'rev' : unreferenced local variable Int64.c(2838) : warning C4101: 'other' : unreferenced local variable Int64.c(2864) : warning C4101: 'rev' : unreferenced local variable Int64.c(2863) : warning C4101: 'other' : unreferenced local variable Int64.c(2889) : warning C4101: 'rev' : unreferenced local variable Int64.c(2888) : warning C4101: 'other' : unreferenced local variable Int64.c(2914) : warning C4101: 'rev' : unreferenced local variable Int64.c(2913) : warning C4101: 'other' : unreferenced local variable c:\documents and settings\owner\desktop\cpan libs\math-int64-0.19\int6 +4.xs(602) : warning C4700: local variable 'RETVAL' used without havin +g been initialized I THINK YOU HAVE A BUG HERE AND LEAKED A SCALAR SV * miu64_native_to_uint64(native) SV *native PREINIT: STRLEN len; char *pv = SvPV(native, len); CODE: if (len != 8) Perl_croak(aTHX_ "Invalid length for uint64"); if (use_native) { RETVAL = newSVuv(0); Copy(pv, &(SvUVX(RETVAL)), 8, char); } else { newSVu64(aTHX_ 0); >>>>>>>>>>>>>>> Copy(pv, &(SvU64X(RETVAL)), 8, char); } OUTPUT: RETVAL c:\documents and settings\owner\desktop\cpan libs\math-int64-0.19\int6 +4.xs(167) : warning C4715: 'SvSI64' : not all control paths return a +value PERL DOESN'T USE __declspec(noreturn) FOR CROAK, IT SHOULD, IDK WHAT T +O DO static SV * SvSI64(pTHX_ SV *sv) { if (SvRV(sv)) { SV *si64 = SvRV(sv); if (si64 && (SvTYPE(si64) >= SVt_I64)) return si64; } Perl_croak(aTHX_ "internal error: reference to NV expected"); >>>>>>>>>>>>>>>>>>} c:\documents and settings\owner\desktop\cpan libs\math-int64-0.19\int6 +4.xs(177) : warning C4715: 'SvSU64' : not all control paths return a +value PERL DOESN'T USE __declspec(noreturn) FOR CROAK, IT SHOULD, IDK WHAT T +O DO static SV * SvSU64(pTHX_ SV *sv) { if (SvRV(sv)) { SV *su64 = SvRV(sv); if (su64 && (SvTYPE(su64) >= SVt_I64)) return su64; } Perl_croak(aTHX_ "internal error: reference to NV expected"); >>>>>>>>>>>>>>} Running Mkbootstrap for Math::Int64 () C:\perl512\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 Int6 +4.bs C:\perl512\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NA +ME'=>\"Math::Int64\", 'DLBASE' => 'Int64', 'DL_FUNCS' => { }, 'FUNCL +IST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" link -out:blib\arch\auto\Math\Int64\Int64.dll -dll -nologo -nodefa +ultlib -debug -libpath:"c:\perl512\lib\CORE" -machine:x86 Int64.obj + C:\perl512\lib\CORE\perl512.lib oldnames.lib kernel32.lib user32.l +ib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole3 +2.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.li +b version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib -def:I +nt64.def Creating library blib\arch\auto\Math\Int64\Int64.lib and object bli +b\arch\auto\Math\Int64\Int64.exp if exist blib\arch\auto\Math\Int64\Int64.dll.manifest mt -nologo - +manifest blib\arch\auto\Math\Int64\Int64.dll.manifest -outputresource +:blib\arch\auto\Math\Int64\Int64.dll;2 if exist blib\arch\auto\Math\Int64\Int64.dll.manifest del blib\arc +h\auto\Math\Int64\Int64.dll.manifest C:\perl512\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 blib +\arch\auto\Math\Int64\Int64.dll C:\perl512\bin\perl.exe -MExtUtils::Command -e "cp" -- Int64.bs bl +ib\arch\auto\Math\Int64\Int64.bs C:\perl512\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 blib +\arch\auto\Math\Int64\Int64.bs Files found in blib\arch: installing files in blib\lib into architectu +re dependent library tree Installing C:\perl512\site\lib\auto\Math\Int64\Int64.dll Installing C:\perl512\site\lib\auto\Math\Int64\Int64.exp Installing C:\perl512\site\lib\auto\Math\Int64\Int64.ilk Installing C:\perl512\site\lib\auto\Math\Int64\Int64.lib Installing C:\perl512\site\lib\auto\Math\Int64\Int64.pdb Appending installation info to c:\perl512\lib/perllocal.pod

Replies are listed 'Best First'.
Re^12: supporting quads on 32 bit Perl
by salva (Canon) on Jun 02, 2012 at 22:00 UTC
    The warning Int64.xs(756) : warning C4554: '<<' : check operator precedence for possible error; use parentheses to clarify precedence, indicated a bug on the srand function (already solved on the git version).

    The others warnings are harmless.

      I built the latest github version.
      cp lib/Math/Int64.pm blib\lib\Math\Int64.pm cp lib/Math/Int64/die_on_overflow.pm blib\lib\Math\Int64\die_on_overfl +ow.pm cp lib/Math/Int64/native_if_available.pm blib\lib\Math\Int64\native_if +_available.pm C:\perl512\bin\perl.exe C:\perl512\lib\ExtUtils\xsubpp -typemap C +:\perl512\lib\ExtUtils\typemap Int64.xs > Int64.xsc && C:\perl512\bi +n\perl.exe -MExtUtils::Command -e "mv" -- Int64.xsc Int64.c cl -c -I. -nologo -GF -W3 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CON +SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMP +LICIT_SYS -DUSE_PERLIO -Od -MD -Zi -DDEBUGGING -DVERSION=\"0.19\" + -DXS_VERSION=\"0.19\" "-IC:\perl512\lib\CORE" -DINT64_BACKEND_NV I +nt64.c Int64.c Int64.xs(253) : warning C4244: 'initializing' : conversion from 'NV' t +o 'int64_t', possible loss of data Int64.xs(259) : warning C4244: 'return' : conversion from 'NV' to 'int +64_t', possible loss of data Int64.xs(339) : warning C4244: 'initializing' : conversion from 'NV' t +o 'uint64_t', possible loss of data Int64.xs(345) : warning C4244: 'return' : conversion from 'NV' to 'uin +t64_t', possible loss of data Int64.xs(355) : warning C4244: 'initializing' : conversion from 'int64 +_t' to 'IV', possible loss of data Int64.xs(360) : warning C4244: 'initializing' : conversion from 'int64 +_t' to 'UV', possible loss of data Int64.xs(364) : warning C4244: 'function' : conversion from 'int64_t' +to 'const NV', possible loss of data Int64.xs(370) : warning C4244: 'initializing' : conversion from 'uint6 +4_t' to 'UV', possible loss of data Int64.xs(373) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const NV', possible loss of data Int64.xs(385) : warning C4244: 'initializing' : conversion from 'uint6 +4_t' to 'char', possible loss of data Int64.xs(502) : warning C4244: 'function' : conversion from 'int64_t' +to 'const IV', possible loss of data Int64.xs(526) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const UV', possible loss of data Int64.xs(545) : warning C4244: '=' : conversion from 'int64_t' to 'cha +r', possible loss of data Int64.xs(563) : warning C4244: '=' : conversion from 'uint64_t' to 'ch +ar', possible loss of data Int64.xs(679) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const IV', possible loss of data Int64.xs(690) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const UV', possible loss of data Int64.xs(700) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const IV', possible loss of data Int64.xs(710) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const UV', possible loss of data Int64.xs(722) : warning C4244: 'function' : conversion from 'int64_t' +to 'const IV', possible loss of data Int64.xs(733) : warning C4244: 'function' : conversion from 'uint64_t' + to 'const IV', possible loss of data Int64.c(1262) : warning C4101: 'rev' : unreferenced local variable Int64.c(1261) : warning C4101: 'other' : unreferenced local variable Int64.c(1290) : warning C4101: 'rev' : unreferenced local variable Int64.c(1289) : warning C4101: 'other' : unreferenced local variable Int64.c(1679) : warning C4101: 'rev' : unreferenced local variable Int64.c(1706) : warning C4101: 'rev' : unreferenced local variable Int64.c(1938) : warning C4101: 'rev' : unreferenced local variable Int64.c(1937) : warning C4101: 'other' : unreferenced local variable Int64.c(1963) : warning C4101: 'rev' : unreferenced local variable Int64.c(1962) : warning C4101: 'other' : unreferenced local variable Int64.c(1988) : warning C4101: 'rev' : unreferenced local variable Int64.c(1987) : warning C4101: 'other' : unreferenced local variable Int64.c(2013) : warning C4101: 'rev' : unreferenced local variable Int64.c(2012) : warning C4101: 'other' : unreferenced local variable Int64.c(2038) : warning C4101: 'rev' : unreferenced local variable Int64.c(2037) : warning C4101: 'other' : unreferenced local variable Int64.c(2063) : warning C4101: 'rev' : unreferenced local variable Int64.c(2062) : warning C4101: 'other' : unreferenced local variable Int64.c(2088) : warning C4101: 'rev' : unreferenced local variable Int64.c(2087) : warning C4101: 'other' : unreferenced local variable Int64.c(2113) : warning C4101: 'rev' : unreferenced local variable Int64.c(2112) : warning C4101: 'other' : unreferenced local variable Int64.c(2140) : warning C4101: 'rev' : unreferenced local variable Int64.c(2139) : warning C4101: 'other' : unreferenced local variable Int64.c(2505) : warning C4101: 'rev' : unreferenced local variable Int64.c(2532) : warning C4101: 'rev' : unreferenced local variable Int64.c(2764) : warning C4101: 'rev' : unreferenced local variable Int64.c(2763) : warning C4101: 'other' : unreferenced local variable Int64.c(2789) : warning C4101: 'rev' : unreferenced local variable Int64.c(2788) : warning C4101: 'other' : unreferenced local variable Int64.c(2814) : warning C4101: 'rev' : unreferenced local variable Int64.c(2813) : warning C4101: 'other' : unreferenced local variable Int64.c(2839) : warning C4101: 'rev' : unreferenced local variable Int64.c(2838) : warning C4101: 'other' : unreferenced local variable Int64.c(2864) : warning C4101: 'rev' : unreferenced local variable Int64.c(2863) : warning C4101: 'other' : unreferenced local variable Int64.c(2889) : warning C4101: 'rev' : unreferenced local variable Int64.c(2888) : warning C4101: 'other' : unreferenced local variable Int64.c(2914) : warning C4101: 'rev' : unreferenced local variable Int64.c(2913) : warning C4101: 'other' : unreferenced local variable c:\documents and settings\owner\desktop\cpan libs\math-int64-0.19\int6 +4.xs(602) : warning C4700: local variable 'RETVAL' used without havin +g been initialized c:\documents and settings\owner\desktop\cpan libs\math-int64-0.19\int6 +4.xs(167) : warning C4715: 'SvSI64' : not all control paths return a +value c:\documents and settings\owner\desktop\cpan libs\math-int64-0.19\int6 +4.xs(177) : warning C4715: 'SvSU64' : not all control paths return a +value Running Mkbootstrap for Math::Int64 () C:\perl512\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 Int6 +4.bs C:\perl512\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NA +ME'=>\"Math::Int64\", 'DLBASE' => 'Int64', 'DL_FUNCS' => { }, 'FUNCL +IST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" link -out:blib\arch\auto\Math\Int64\Int64.dll -dll -nologo -nodefa +ultlib -debug -libpath:"c:\perl512\lib\CORE" -machine:x86 Int64.obj + C:\perl512\lib\CORE\perl512.lib oldnames.lib kernel32.lib user32.l +ib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole3 +2.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.li +b version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib -def:I +nt64.def Creating library blib\arch\auto\Math\Int64\Int64.lib and object bli +b\arch\auto\Math\Int64\Int64.exp if exist blib\arch\auto\Math\Int64\Int64.dll.manifest mt -nologo - +manifest blib\arch\auto\Math\Int64\Int64.dll.manifest -outputresource +:blib\arch\auto\Math\Int64\Int64.dll;2 if exist blib\arch\auto\Math\Int64\Int64.dll.manifest del blib\arc +h\auto\Math\Int64\Int64.dll.manifest C:\perl512\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 blib +\arch\auto\Math\Int64\Int64.dll C:\perl512\bin\perl.exe -MExtUtils::Command -e "cp" -- Int64.bs bl +ib\arch\auto\Math\Int64\Int64.bs C:\perl512\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 blib +\arch\auto\Math\Int64\Int64.bs Files found in blib\arch: installing files in blib\lib into architectu +re dependent library tree Installing C:\perl512\site\lib\auto\Math\Int64\Int64.dll Installing C:\perl512\site\lib\auto\Math\Int64\Int64.exp Installing C:\perl512\site\lib\auto\Math\Int64\Int64.ilk Installing C:\perl512\site\lib\auto\Math\Int64\Int64.lib Installing C:\perl512\site\lib\auto\Math\Int64\Int64.pdb Appending installation info to c:\perl512\lib/perllocal.pod
      what about the RETVAL warning in miu64_native_to_uint64? newSVu64 doesn't return a mortal SV, and SV * wasn't saved and therefore leaked. miu64_native_to_int64 is correct and it saves the result of newSVi64.
        what about the RETVAL warning in miu64_native_to_uint64? newSVu64 doesn't return a mortal SV, and SV * wasn't saved and therefore leaked. miu64_native_to_int64 is correct and it saves the result of newSVi64.

        oops, I overlooked that one!

        It was a regression introduced in some of the 0.18_xx releases. I have solved it and added some tests for uint64 serializations.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://974059]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-19 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found