Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!uwm.edu!ux1.cso.uiuc.edu!news.iastate.edu!sharkey!amara!mcdaniel From: mcdaniel@adi.com (Tim McDaniel) Newsgroups: comp.lang.c Subject: Re: Assignment Ops and Side Effects Message-ID: Date: 8 Apr 91 19:39:46 GMT References: <1991Apr3.173046.2367@mccc.edu> <1991Apr4.202314.961@csrd.uiuc.edu> <11805@dog.ee.lbl.gov> <1991Apr5.012413.24124@athena.mit.edu> <1991Apr5.234636.22610@csrd.uiuc.edu> <18324@crdgw1.crd.ge.com> Sender: news@adi.COM Organization: Applied Dynamics International, Inc.; Ann Arbor, Michigan, USA Lines: 17 In-reply-to: volpe@camelback.crd.ge.com's message of 8 Apr 91 13:14:50 GMT In article <18324@crdgw1.crd.ge.com> volpe@camelback.crd.ge.com (Christopher R Volpe) writes: Could someone explain to me why sizeof(c=1) is 1 and not (typically) 4?? The result of the assignment operator is not an l-value, and thus undergoes the integral promotions. Not true. The default arithmetic conversions are never applied to the operand of sizeof, whether lvalue or not; see section 3.3.3.4. (It doesn't mention any promotions there. It's always careful to mention promotions where they occur, as under "+".) -- "Of course he has a knife. We all have knives. It's 1183, and we're all barbarians." Tim McDaniel Applied Dynamics Int'l.; Ann Arbor, Michigan, USA Internet: mcdaniel@adi.com UUCP: {uunet,sharkey}!amara!mcdaniel