|
|
|
|
|
by dataflow
760 days ago
|
|
Signedness doesn't affect anything here, as long as the representation is in two's complement. The negation of x (i.e. -x) in two's complement is ~x + 1. The interpretation of the bits as signed or unsigned doesn't change any of the following steps. |
|
If x had type unsigned int, this wouldn't introduce undefined behaviour.