I recently read that signed integer overflow in C and C++ causes undefined behavior:
If during the evaluation of an expression, the result is not math
It is undefined what value is represented by the int. There's no 'overflow' in memory like you thought.
int