4 ms·
The situation is even worse, due to the possible interleaving of the execution of function calls.
by Koshkin 5y ago
The situation is even worse, due to the possible interleaving of the execution of function calls.
- towergratis 5y agoThe root cause is the same
- Koshkin 5y agoWell, except that C does not have exceptions (at least not in the way that C++ does).
- jhgb 5y agoHow is it "the same"? If the evaluations of the individual arguments can't overlap, then the C example's problem still exists while the C++ example's problem doesn't. And if the order of evaluation were guaranteed but the evaluations could overlap, the C example wouldn't have a problem but the C++ example still would. To me the two problem's causes seem quite different.