Aren't arguments always evaluated left to right?
Rein Klazes wrote:
Hi,
82 cases, most a variation of:
ok( !Foo(), "Foo failed, error %ld\n", GetLastError());
Changelog: dlls/kernel/tests : change.c, file.c, process.c, thread.c, time.c dlls/user/tests : clipboard.c, msg.c, text.c win.c
Correct cases where arguments of ok() calls depend on the order in which they are evaluated.
On Thu, 23 Dec 2004 17:13:26 +0100, you wrote:
Aren't arguments always evaluated left to right?
I can not remember the rule in C that say so. There is a rule that specifies that each argument is evaluated fully before evaluating the next one, but the order in winch this happens is free to the compiler
Moreover I only do this exercise because on my wine (compiled with gcc 3.4) they were not.
Rein.
On Thu, Dec 23, 2004 at 09:35:14PM +0100, Rein Klazes wrote:
I can not remember the rule in C that say so. There is a rule that specifies that each argument is evaluated fully before evaluating the next one, but the order in winch this happens is free to the compiler
I am pretty sure that the order of evaluation is not fixed because I once had to fix some bugs in ScummVM because the order of evaluation on the ARM platform was not the same as the one on X86 (which lead to all sort of crazy stuff with code like 'foo(pop(), pop());' :-) ).
Lionel