[False asumption, sorry!] Unused functions are compiled, how to avoid this?

Ok I wasn't sure...

This is example code:

void setup()
{
}

void loop()
{
  //func();
}

void func()
{
  char str[256];
  sprintf(str, "blablablablablabla");
}

I clicked Verify, then looked the resulting .cpp.o file in IDA and saw that "func" was still present.

But after lloyddean's answer, and looking this page: Redirecting , I realized I was wrong, the .cpp.o is not what is uploaded to the Arduino :slight_smile: