Hacker News new | ask | show | jobs
by cautious_int 3957 days ago
Because unsigned overflow will not happen in C, and will instead wrap the value. The variables in question were unsigned.

This is defined and perfectly normal.

However signed integers will cause undefined behavior on overflow and there is a common flag in most compilers to trap on overflow.