Old-fashioned assignment operators (was Re: braces

Henry Spencer henry at utzoo.uucp
Sun Dec 18 12:42:40 AEST 1988


In article <2155 at uokmax.UUCP> rmtodd at uokmax.UUCP (Richard Michael Todd) writes:
>  The question I have is, what exactly *is* the correct interpretation of
>x=-y in modern C? ...

The old-style assignment operators are long gone.  =- is the assignment
operator followed by the unary-negation operator.

>   Finally, I question why this business of checking for old-fashioned 
>assignment operators is still in Unix C compilers.  After all, V7 came
>out around 10 years ago!  Does anyone really have around any code that hasn't
>been converted to the new syntax by *now*?  

You would be surprised at the magnitude of the dusty-deck problem.  There
are undoubtedly sites that are still running ten-year-old *binaries*,
never mind sources.  I fear that it is probably still a good idea for
compilers to issue a warning message.
-- 
"God willing, we will return." |     Henry Spencer at U of Toronto Zoology
-Eugene Cernan, the Moon, 1972 | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.unix.wizards mailing list