Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.lang.c Subject: Re: precedence of && (was: precedence of ?:) Message-ID: <3263@solo5.cs.vu.nl> Date: 14 Sep 89 21:41:32 GMT References: <1265@gmdzi.UUCP> <11030@smoke.BRL.MIL> <11039@smoke.BRL.MIL> <3236@solo10.cs.vu.nl> <11045@smoke.BRL.MIL> <3242@solo12.cs.vu.nl> <11054@smoke.BRL.MIL> <1989Sep14.175841.8086@twwells.com> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 22 bill@twwells.com (T. William Wells) writes: \... a ? b : c = d \ \can't be parsed as (a ? b : c) = d, since a ? b : c isn't a \unary-expression. It can, however, be parsed as a ? b : (c = d). As \far as I know, there are no compilers that this breaks on. \ \Similarly one analyzes a && b = c: STOP! Let's do precisely what you said, let's analyze a && b = c SIMILARLY: a && b = c "can't be parsed as (a && b) = c, since a && b isn't a unary-expression. It can, however, be parsed as a && (b = c). As far as I know, there are no compilers that this breaks on." But wait! This example breaks on EVERY compiler! -- creat(2) shouldn't have been create(2): |Maarten Litmaath @ VU Amsterdam: it shouldn't have existed at all. |maart@cs.vu.nl, mcvax!botter!maart