Assuming I have 2 variables:
uint64_t a = ...
uint32_t b = ...
Will comparing the integers yield the expected results, i.e. (a != b)
, or (b > a)
?
Assuming I have 2 variables:
uint64_t a = ...
uint32_t b = ...
Will comparing the integers yield the expected results, i.e. (a != b)
, or (b > a)
?
No problem. The compiler promotes the 32-bit to 64-bit before the comparison
Short answer - yes. The 'smaller' is converted to bigger one before comparison.