Yes, I do not speak ex cathedra.
The question remains why
precipitates an error.
Because, as it has been pointed out in this thread e.g. by
Keith Thompson, it's parsed as
-- ( -x );
and '-x' is the *number* one gets when taking the negative of
what's stored in the variable 'x'. But a value can't be decre-
mented, only a variable can. So it's akin to '---3'. If you want
- ( --x );
(i.e. decrement what's stored in 'x' and, as a result of the ex-
pression, get the negative of the resulting value, i.e. what's
stored in 'x' after the decrement) then you have to write it that
way. What you want with that is a different question, of course,
since it doesn't make much sense because the resulting value will
be thrown away.
If you're just assembling random tokens to see what happens you
shouldn't be too surprised that some combinations don't make any
sense, there's no language (computer or human) where all possible
combinations of tokens are meaningful - normally only a small
subset of all possible combinations is syntactically correct:
* Is brown dog the.
The dog is brown.
* Brown dog the is.
* The brown dog is.
Brown is the dog.
* Is brown the dog.
....
Some of those sentences make sense, some don't (at least for a
"standard english speaker"). Same for C, some combinations of
tokens don't make sense. And e.g. '---3' isn't correct nor is
'---x'. The difference to a human language is that the rules
of what's correct are clearly defined and can be looked up in
the standard for the C language. That's what C compiler writers
have to care for, not random assemblies of tokens.
Regards, Jens