Jorge PEREZ <jorge.perez@xxxxxxxx> writes: > Thanks Cedric, I actually checked the ABI (SYSTEM V APPLICATION BINARY > INTERFACE) but couldn't find any information regarding the calling > convention when casts should be made, it also seems to differ from GCC > to LLVM, no idea why though :( psABI3rd.pdf (System V Application Binary Interface, SPARC® Processor Supplement, Third Edition) page 3-14 stipulates: # Functions pass all integer-valued arguments as words, expanding # signed or unsigned bytes and halfwords as needed. I understand this to mean that the caller should expand the values. There is similar wording on page 3P-12 of SCD.2.4.ps.Z (SPARC Compliance Definition 2.4, 32/64 bits, August 1998), for the 64-bit psABI: # Each argument value of integral type smaller than an extended # word will be widened by the caller to an extended word # according to the signed-ness of the argument type. But I don't know whether GCC and LLVM purport to conform to these ABIs on SPARC.