From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: printf bug ??? Date: Fri, 05 Jun 1998 18:44:56 -0700 Organization: Alcyone Systems Lines: 23 Message-ID: <35789F18.156B3204@alcyone.com> References: <35784F8A DOT AB5D79CC AT gpu DOT srv DOT ualberta DOT ca> NNTP-Posting-Host: charmaine.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Blaine Hodge wrote: > > > printf("%d %d %d", i, i++, i++); ... > Then its VC at fault (gee, imagine that), sounds like its evaluating > it > using the Pascal calling method, left to right, and not C/C++, right > to > left. No, neither compiler is wrong. The result of the above code is undefined. That means that it can do anything from printing zeroes (even though i started with 0) to computing pi, to crashing -- any of those would be perfectly ANSI compliant implementations, since it's a user error. -- Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com Alcyone Systems / http://www.alcyone.com/max/ San Jose, California, United States / icbm:+37.20.07/-121.53.38 \ She glanced at her watch / . . . It was 9:23. / James Clavell