Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.bugs.4bsd Subject: Re: C compiler incorrectly handles castes on lhs Message-ID: <5985@utzoo.UUCP> Date: Thu, 19-Sep-85 12:35:04 EDT Article-I.D.: utzoo.5985 Posted: Thu Sep 19 12:35:04 1985 Date-Received: Thu, 19-Sep-85 12:35:04 EDT References: <937@vax2.fluke.UUCP> Organization: U of Toronto Zoology Lines: 12 > The Vax 4.2 C compiler incorrectly generates a fatal error message > when castes to a pointer type appear on the lhs of an assignment. > The SUN C compiler and other c compilers I have tried correctly > handle this assignment. I believe that modern definitions of C make it clear that this is not legal C; the SUN C compiler (and others) are being sloppy. The cast has to go on the right-hand-side, casting the value to the type of the variable rather than vice-versa. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry