Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!shelby!apple!gem.mps.ohio-state.edu!wuarchive!cs.utexas.edu!uunet!zephyr.ens.tek.com!orca!frip!andrew From: andrew@frip.WV.TEK.COM (Andrew Klossner) Newsgroups: gnu.gcc.bug Subject: non-bug003 (order of auto-increment) Message-ID: <4737@orca.WV.TEK.COM> Date: 28 Sep 89 14:37:45 GMT References: <8909272213.AA02132@oriley> Sender: nobody@orca.WV.TEK.COM Reply-To: andrew@frip.wv.tek.com Distribution: gnu Organization: Tektronix, Wilsonville, Oregon Lines: 12 rajeevc@oriley.intel.com complains that i = 0; j = i++ + i++; sets j to 0 instead of 1. No bug here, the compiler is correct. The language does not specify the relative order of auto-increments and operand fetches. -=- Andrew Klossner (uunet!tektronix!frip.WV.TEK!andrew) [UUCP] (andrew%frip.wv.tek.com@relay.cs.net) [ARPA]