Closed vladtepesch closed 6 years ago
Hi there. Well, is the warning mentioned the only problem you have? To be honest I don't remember the actual reason behind unsigned long usage but there should be the one definitely (some compilers compatibility?). Therefore I'd prefer to leave it as is for now if no actual problems seen just warnings
the problem is that on 64bit architecures an unsigned long
is not necesarily 64bit wide. changing it to uintptr_t
guarantees that the pointer fits in and does not trigger this warning. of course - only the lower 4 bits are tested, so truncating the pointer does not matter, but every inclusion of the header produces a huge load of compiler warning and especially this kind of warning usually is of the kind you do not want to suppress on a global level.
Edit: On MSVC its a level 1 (highest) warning
when checking the input pointer alignment in numerous
vld*
functions (--> macroLOAD_SI128
): the pointer should be casted touintptr_t
instead ofunsigned long