3 ms·
Wrong again. Function parameters are passed as if the values were assigned to variables of the corresponding types using the usual implicit conversion rules.
by mansr 16y ago
Wrong again. Function parameters are passed as if the values were assigned to variables of the corresponding types using the usual implicit conversion rules. If the function parameter has type of different width than the value being passed, a truncation or sign/zero extension happens. A signed value assigned to an equal-width unsigned parameter retains the same bit pattern (in 2's complement). Unsigned to signed conversion is potentially unspecified (out of range values). All known ARM compilers convert from unsigned to signed by keeping the bits unchanged. In no case does the signedness of parameters affect the speed of the compiled code (on ARM).
- pietrofmaggi 16y agoYep^2 Thanks for remembering this. Time to take a break for today.