Function Argument Evaluation
Chris Torek
torek at elf.ee.lbl.gov
Wed Mar 27 20:59:34 AEST 1991
[this is a correction of a cancelled article, with the word `not' inserted
in a strategic location.]
In article <1991Mar26.181821.22912 at cs.ucla.edu>
jon at maui.cs.ucla.edu (Jonathan Gingerich) writes:
>... My question remains 'Does "the value of the left operand after
>the assignment" mean "immediately after" or "sometime after, before
>the next sequence point"?'
Yes.
It also means anything else you can come up with that fits, since it is
not pinned down any more precisely. The method by which `the value of
the left operand after assignment' is computed is entirely up to the
compiler. I would not be surprised to see a compiler turn:
char c; int *ip;
...
f(*ip++ = c, *ip++ = 0);
into:
extbl r1, p0 // turn byte in r1 into integer
// with result going into `parameter
// register 0'
stl p0, [r2] // store result through pointer ip
clrl p1 // put 0 in parameter register 1
stl p1, [r2] // store result through pointer ip
incl 8, r2 // add sizeof 2 ints to pointer ip
call _f // and call function
--
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA Domain: torek at ee.lbl.gov
More information about the Comp.std.c
mailing list