I will be forever haunted by the fact that in C (and rust) u32_value >> 32 is not 0
I will be forever haunted by the fact that in C (and rust) u32_value >> 32 is not 0
Like, to my understanding, on C this is left up to the implementer or maybe UB?
In rust, I think its platform dependent, but also rust will make it hard to do this (it won't let you >> 32 directly and panics with overflow checks on)
In C it is UB. Rust will panic with overflow assertions or otherwise not do anything at all (i.e. return the original value without changing it).
Both of those are not "result in a zero".