logoalt Hacker News

msicherttoday at 3:17 PM0 repliesview on HN

That's very interesting, I'm only familiar with the C++ standard where bit shifts are defined in terms of multiplications and divisions by powers of 2: https://eel.is/c++draft/expr.shift

So it seems in regard to bit shifts, C++ behaves slightly differently (it seems to have less UB) than C.