Inspired by this question about whether the compiler can optimize away a call to a function without side effects. Suppose I have the following code:
delete[] new char[10];
It does nothing useful. But does it have a side effect? Is heap allocation immediately followed by a deallocation considered a side effect?