Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!pasteur!ucbvax!decwrl!labrea!polya!kaufman From: kaufman@polya.STANFORD.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: Bug (?) in MPW C v2.0.2 Message-ID: <2739@polya.STANFORD.EDU> Date: 1 May 88 16:01:53 GMT References: <6330@cit-vax.Caltech.Edu> Reply-To: kaufman@polya.stanford.edu (Marc T. Kaufman) Organization: Stanford University Lines: 16 In article <6330@cit-vax.Caltech.Edu> woody@tybalt.caltech.edu (William Edward Woody) writes: >I think I've found a bug in MPW C v2.0.2. Can others out there >verify if this is a problem? >The bug: > In the expression: > screen->h = (page->h) >> p2wscale + xOffset; According to the C standard (and, indeed, according to the compiler), this expression is evaluated as: screen->h = (page->h) >> (p2wscale + xOffset); since '+' has a higher precedence than '>>'