The compiler is correct. x++ is an rvalue expression, and it's impossible to take an address of an rvalue.
Simplifying, lvalue is an expression that identifies an object that exists in RAM, it has an address. rvalue is an expression that identifies a non-object value or a temporary object, which you can treat as if it only exists in the CPU, it has no address.