Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!aplcen!haven!grebyn!ckp From: ckp@grebyn.com (Checkpoint Technologies) Newsgroups: comp.lang.c Subject: Re: ?: Message-ID: <19331@grebyn.com> Date: 3 Feb 90 04:59:07 GMT References: <6200014@ux1.cso.uiuc.edu> Reply-To: ckp@grebyn.UUCP (Checkpoint Technologies) Organization: Grebyn Timesharing, Vienna, VA, USA Lines: 14 In article <6200014@ux1.cso.uiuc.edu> phil@ux1.cso.uiuc.edu writes: > >Do any compilers accept this kind of syntax (which as far as I can tell is >bogus C since ?: does not yield an lvalue, but is not ambiguous): > > ( a == b ? x : y ) += z; /* x and y are lvalues */ How about this: *((a == b) ? &x : &y) += z; Of course x and y must be of the same type, or at least reasonably compatible types (if you feel adventurous - not that this is what I'm reccommending, mind you).