#include <Core/Core.h>
using namespace Upp;
int BigFunction(int);
struct C
{
void DoNothing(){}
int Call(){ return BigFunction(1); }
};
CONSOLE_APP_MAIN
{
C().DoNothing();
}
With
BigFunction()
same as Senario 1&2 in the last test. Both CLANGx64 and MSBT22x64 produced the same results as in Senario 2 in test 3, respectively. (Modern) C++ compilers (seem to) do very well on optimize out unused member functions. I know the test is not very well designed and is not convincing but let's believe in this until it's proven wrong.