On Tue, 24 Jan 2023 at 13:52, Jonny Grant <jg@xxxxxxxx> wrote: > > Probably other functions be "compiled out" like memset() is, would memcpy() be compiled out? The compiler can do anything which does not change the observable side effects of a valid program. https://en.cppreference.com/w/cpp/language/as_if So yes, the compiler can omit a memcpy that doesn't do anything. Or any other function call that doesn't do anything.