Assuming I have 2 variables:
uint64_t a = ...
uint32_t b = ...
Will comparing the integers yield the expected results, ie (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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.