[comp.unix.wizards] =op in C

gwyn@smoke.BRL.MIL (Doug Gwyn ) (12/17/88)

In article <2151@uokmax.UUCP> randy@uokmax.UUCP (Longshot) writes:
>As an interesting aside, the cc here on our Multimax will generate warnings for
>	x=-y;	/* x = -y or x =- y? */

Sigh.  Not only is this not a UNIX-WIZARDS issue, it's not even
much of a C issue.  I don't know HOW many books explain this,
but it's a lot!  =op used to be the way that the assignment
operators were written.  When that was officially changed to
op= (in order to avoid user errors in cases like =- vs. = -),
the old =op form was still supported for a while, at first with
a warning and the old meaning, then with a warning and the new
meaning, now without a warning and with the new meaning.  Some
compilers are behind the times.