Isn't this undefined behavior for signed integers?