Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If b is uint8_t you get zero if you <<8, but the expected value if you * by (int)256; or is it late and I should keep quiet?


The shift will automatically promote `b` to int, so the result is identical in both cases.


Thanks. I'm mostly paranoid about whether the ROL instruction has precedence over the OR ... ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: