Function Argument Evaluation

Chris Torek torek at elf.ee.lbl.gov
Wed Mar 27 20:44:20 AEST 1991


In article <17895 at crdgw1.crd.ge.com> volpe at camelback.crd.ge.com
(Christopher R Volpe) writes:
>However, isn't this a moot point? The only time the value of 'expression'
>before assignment may NOT be equal to the value of 'lvalue' after 
>assignment is in the case that 'lvalue' has its contents modified more
>than once between sequence points, in which case all bets are off.

No: one typical case is:

	unsigned char c;
	unsigned long l;
	...
	(void) printf("l=%lx c=%x\n", l, (c = l));

which (again, `typically') pushes `l' through a `character knothole'
and `scrapes off' the top bits.
-- 
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