Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!decuac!grebyn!ckp From: ckp@grebyn.com (Checkpoint Technologies) Newsgroups: comp.lang.c Subject: Re: Assignment Ops and Side Effects Message-ID: <1991Apr5.055707.16561@grebyn.com> Date: 5 Apr 91 05:57:07 GMT References: <1991Apr3.173046.2367@mccc.edu> <1991Apr4.202314.961@csrd.uiuc.edu> Organization: Grebyn Timesharing Lines: 19 In article <1991Apr4.202314.961@csrd.uiuc.edu> bliss@sp64.csrd.uiuc.edu (Brian Bliss) writes: >P.S. an interesting tidbit I just found out: >if you're on a machine where sizeof (int) == 4, then > >char ch; >sizeof (ch += 1) == 4 >sizeof (ch++) == 1 > >apparrently operands of ++ and -- do not undergo integral promotion Is this really true? Is it standard? Does this means that if ch = 0xff (unsigned, 8 bit char), then i = (++ch) assigns 0 to i (since the increment caused it to overflow)? -- First comes the logo: C H E C K P O I N T T E C H N O L O G I E S / / ckp@grebyn.com \\ / / Then, the disclaimer: All expressed opinions are, indeed, opinions. \ / o Now for the witty part: I'm pink, therefore, I'm spam! \/