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

Just to correct my own comment:

> with an uint8_t local variable and size_t return value, an earlier optimisation removes the cast to uint8_t, because it only has an effect when undefined behaviour has been triggered

In this case, there is no undefined behaviour, because a narrowing cast to an unsigned type is well-defined. So, this could never have been a good explanation.



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

Search: