Path: utzoo!attcan!uunet!portal!cup.portal.com!Tim_CDC_Roberts From: Tim_CDC_Roberts@cup.portal.com Newsgroups: comp.lang.c Subject: Re: Pcc bites it (was Re: programming puzzle (silly)) Message-ID: <15936@cup.portal.com> Date: 17 Mar 89 17:31:57 GMT References: <28336@ucbvax.BERKELEY.EDU> <2550086@hpisod2.HP.COM> Distribution: na Organization: The Portal System (TM) Lines: 17 In <2550086@hpisod2.HP.COM>, decot@hpisod2.HP.COM (Dave Decot) writes: >> (n&&m) *= n-- > ... doesn't have two different valid interpretations, so it's not > ambiguous, so the precedence rules are not applicable. I disagree with this statement. The parser does not necessarily have any knowledge about whether a construct is _semantically_ valid. It is attempting to make a _syntactically_ valid interpretation, and BOTH interpretations [ (n&&m) *= n-- vs. n && (m*=n--) ] are syntactically valid. I say this tentatively - I've written compilers, but not a C compiler. I would appreciate an opinion by a C compiler writer. Tim_CDC_Roberts@cup.portal.com | Control Data... ...!sun!portal!cup.portal.com!tim_cdc_roberts | ...or it will control you.