Date: Sun, 31 Jan 1999 12:44:56 -0700 From: Warner Losh <imp@village.org> To: Andrew Kenneth Milton <akm@zeus.theinternet.com.au> Cc: malartre@aei.ca (Malartre), hackers@FreeBSD.ORG Subject: Re: some weird C Message-ID: <199901311944.MAA90357@harmony.village.org> In-Reply-To: Your message of "Sun, 31 Jan 1999 17:47:08 %2B1000." <199901310747.RAA27181@zeus.theinternet.com.au> References: <199901310747.RAA27181@zeus.theinternet.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <199901310747.RAA27181@zeus.theinternet.com.au> Andrew Kenneth Milton writes: : +----[ Malartre ]--------------------------------------------- : | : | I was expecting 9, not 10. : | since 4+5=9? : : x is pre-incremented, making it 5 *before* the += takes effect. : : This is correct behaviour. Both behaviors are correct. x += x++; is undefined. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901311944.MAA90357>