c++ - Can function calls be reordered -


i using c++98. extent can function calls reordered? not using global state, state of objects local function.

my particular case is:

{   raiitype t;   object1.functioncall();   object2.functioncall(); } 

where object1 , object2 declared in next scope up. constructor t permitted reordered after either function call, assuming can trivially proven (at least human) there no dependencies between construction , function calls?


in particular case, raii object used time execution of function calls.

so long standards-compliant program not tell difference in observable behavior, compiler (as other components in system) may freely reorder instructions , operations likes.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -