6 ms·
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.
by cautious_int 11y 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.