Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!uakari.primate.wisc.edu!ames!think!bloom-beacon!primerd!hobbiton!fieland From: fieland@hobbiton.prime.com Newsgroups: comp.lang.c Subject: Re: address of register variables Message-ID: <192700005@hobbiton> Date: 8 Sep 89 20:56:00 GMT References: <9389@cbnews.ATT.COM> Lines: 16 Nf-ID: #R:cbnews.ATT.COM:-938900:hobbiton:192700005:000:491 Nf-From: hobbiton.prime.com!fieland Sep 8 16:56:00 1989 This problem has nothing to do with i being a register variable. The order of evaluation of the assignment and the increment of i in line 11 is undefined. The Sun compiler has done the assignment first when i is a register variable, and the increment first when it is not. This differs from compiler to compiler. The Mips compiler seems to always do the assignment first. Lint will very nicely print a warning about undefined evaluation order when you run it on this program. Peggy