Function Argument Evaluation
Jonathan Gingerich
jon at maui.cs.ucla.edu
Sat Mar 30 03:43:45 AEST 1991
In article <1991Mar28.194627.26285 at mtxinu.COM> ed at mtxinu.COM (Ed Gould) writes:
>Will this do?
>
> foo() {
> int v = 1;
>
> printf("%d %d\n", v, ++v);
> }
The first argument of v reads v without using the value to set v, so this
too is undefined.
I think "order of evaluation" is a non-issue in ANSI C; 3.3 seems pretty
air-tight. Therefore the value of (l=r) is only of interest in K&R(I) were
the language is similar to (++x), so it's pretty ambiguous. ANSI C has
leap-frogged the whole issue.
Jon.
More information about the Comp.std.c
mailing list