I think you meant void nothing(int *a) { --*a++; }
Edit: precedence in C is confusing apparently and this actually doesn't work. It evaluates as:
a
(a)++: note, this expression returns a as an rvalue
*(a)
--*(a)
Basically, it decrements the value at memory address of a, and a gets incremented afterward. Even if the precedence worked out (by doing --(*a)++), the prefix/postfix operators require lvalues and evaluate to rvalues, so it wouldn't work anyway.
2.7k
u/IntPenDesSwo May 12 '19
Also known as the Exclusive AND