On Sun, Aug 08, 2004 at 08:18:01PM +0100, Nicholas Clark wrote: > On Sun, Aug 08, 2004 at 08:01:52PM +0100, Nicholas Clark wrote: > > On Sun, Aug 08, 2004 at 10:46:20AM -0700, Jarkko Hietaniemi wrote: > > > # New Ticket Created by Jarkko Hietaniemi > > > # Please include the string: [perl #30995] > > > # in the subject line of all future correspondence about this issue. > > > # <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=30995 > > > > > > > > > > Anyone who thinks sizeof(int) == sizeof(long) == sizeof(*) > > > should now as a penance run ten times around the building, backwards. > > There are further assumptions of this implicit in the pointer casts. > > > not ok 13 - nci_i_i3 > > # Failed test (t/pmc/nci.t at line 376) > > # got: '0 > > # 20233590931463 > > # ' > > # expected: '42 > > # 4711 > > # ' > > static void > pcf_i_i3(Interp *interpreter, PMC *self) > { > typedef int (*func_t)(int, int *); > func_t pointer; > int return_data; > > > > pointer = (func_t)D2FPTR(PMC_struct_val(self)); > return_data = (int)(*pointer)((int)REG_INT(5),(int*)&PMC_int_val(REG_PMC(5))); > > > That ponter cast ISN'T going to work where sizeof(PMC_int_val) != sizeof(int)
If we used negative values for these tests rather than postive: set I5, 6 new P5, .PerlInt set P5, 7 they'd fail currently on both big and little endian LP64 systems, wouldn't they? I've only got (working) access to 64 bit longs on Solaris (ICU and AIX g++ don't mix) and even then I'd not have (easy) little endian 64 bit access. Nicholas Clark