Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!mit-eddie!apollo!mishkin From: mishkin@apollo.uucp (Nathaniel Mishkin) Newsgroups: comp.lang.c,comp.bugs.4bsd Subject: lvalues and ++ Message-ID: <31da677c.809c@apollo.uucp> Date: Fri, 12-Dec-86 11:35:09 EST Article-I.D.: apollo.31da677c.809c Posted: Fri Dec 12 11:35:09 1986 Date-Received: Mon, 15-Dec-86 05:07:35 EST Reply-To: mishkin@apollo.UUCP (Nathaniel Mishkin) Organization: Apollo Computer, Chelmsford, MA Lines: 20 Summary: All C compilers are not created equal Xref: mnetor comp.lang.c:356 comp.bugs.4bsd:78 I am having problems with the construct: { long i; char *p; *((long *)p)++; } Some C compilers (e.g. the one sent with 4.3bsd) complain with the error: illegal lhs of assignment operator Other compilers seem to handle this correctly (incrementing by 4, by the way). Is this invalid C or is the 4.3bsd compiler broken? -- Nat Mishkin Apollo Computer Inc. apollo!mishkin