then what about gcc compiler, what order is it following??
Why do you care? You should never write code whose behavior depends
on the order in which arguments are evaluated. Such code is likely to
"work" on the system for which you write it, and fail (subtly or
catastrophically) when you try to compile it on some other system, or
on a newer version of the same compiler, or on the same compiler with
different otimization options, or during a full moon.
The compiler is free to rearrange code between consecutive sequence
points. Since there are no sequence points between argument
evaluations in a single function call, the compiler is free to
rearrange the argument evaluations in any way it likes. If you need a
specific order of evaluation, you need to introduce sequence points.
For example, this:
foo(expr_with_side_effects, expr_with_more_side_effects);
is dangerous, but this:
tmp1 = expr_with_side_effects;
tmp2 = expr_with_more_side_effects;
foo(tmp1, tmp2);
is likely to be safe (if you haven't made any other errors). And
since you're going to use more meaningful names that "tmp1" and
"tmp2", it's likely to be easier to read and maintain.
If that doesn't solve your problem, tell us what you're trying to
accomplish, and we can probably help.