This is a good example of a pointless "optimization" making the code harder to read.
If he had indeed meant that, he should have written
x = ~x + 1;
GCC, even with optimisation turned off, will turn that into a negl instruction.