Assignment Ops and Side Effects
Checkpoint Technologies
ckp at grebyn.com
Fri Apr 5 15:57:07 AEST 1991
In article <1991Apr4.202314.961 at csrd.uiuc.edu> bliss at 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 at grebyn.com \\ / /
Then, the disclaimer: All expressed opinions are, indeed, opinions. \ / o
Now for the witty part: I'm pink, therefore, I'm spam! \/
More information about the Comp.lang.c
mailing list