Subj : Re: Memory visibility and the C compiler... ( a bit long ) To : comp.programming.threads From : Alexander Terekhov Date : Thu Jan 13 2005 06:47 pm SenderX wrote: [...] > > Reordering across "critical instructions" (inline asm > > and/or external asm functions) is still possible (and is in fact > > desirable as long as it doesn't break anything). > > Are you talking about how the C compiler can reorder calls to external > assembled functions? Yes. For example, an external assembled function with the effect of int f(...) { return 42; } can be reordered in all the ways you can imagine. Oder? > Or, how local variables might be moved in adverse Variables and calls. Local and not so local. > ways in the presence of multiple unrelated external function calls? Yes. [...] > I would greatly disapprove of a C compiler inspecting the instructions of > my externally assembles routines! Why not? If it can do better and optimize them as well... regards, alexander. .