------- Comment #10 from falk at debian dot org 2006-04-18 06:27 ------- Uhm, this has nothing to do at all with evaluation order. Evaluation order of arguments is unspecified (not undefined, which wouldn't make a lot of sense), but that is in fact irrelevant here, it could lead to, say, 3 1 2, but not 1 1 1.
The actual problem is that val is modified more than once without an intervening sequence point, which makes the behavior undefined. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27153