Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Autoincrement question Message-ID: <6796@brl-smoke.ARPA> Date: Sat, 5-Dec-87 10:18:02 EST Article-I.D.: brl-smok.6796 Posted: Sat Dec 5 10:18:02 1987 Date-Received: Thu, 10-Dec-87 06:02:23 EST References: <1507@ogcvax.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <1507@ogcvax.UUCP> schaefer@ogcvax.UUCP (Barton E. Schaefer) writes: > bar->tmp = bar++; /* This is the problem line */ The order of evaluation of the operands of "=" is unspecified. If the address of the lvalue on the left-hand size is constructed before the postfix expression on the right is evaluated, one result is obtained; if the expression is evaluated before the lvalue address, the new value of "bar" will be used. Don't take gambles like this.