> I consider it common knowledge TBH
For a seasoned C developer, I’d agree with you, but parent declares himself
> As someone who only writes C or C++ occasionally
… so I think it’s fair enough to not know such details.
C semantics has a few details that often surprise non-regulars, despite being such a small and simple language.
I appreciate Zig's approach, where the runtime complains when over/underflow occurs with the regular `+` operator but explicitly wraps with `+%` (or even saturates with `+|`). Takes a little getting used to (that and explicit unsigned/signed casts) but it's much clearer.