> I am not familar with both c++ and compiler implementation, donot konw
> why the results are differnt for gcc and clang. Anyone could help and
> explain this difference for me?

The ISO C standard says that the evaluation order of function arguments is
unspecified [ISO C99, 6.5.2.2-11], though the implementation (GCC vs.
clang) is free to choose which evaluation order to use. That's why you see
these differences between GCC and clang.

Andi

Reply via email to