Hacker News new | ask | show | jobs
by salawat 1392 days ago
Principle of least surprise violated.

Also, that behavior is not guaranteed. The programmer would need to be aware of how the particular machine in question actually handles that.

Then again, that's C.

1 comments

Unsigned integer underflow and overflow are both guaranteed to wrap by the C standard.