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

With the Arduino IDE this is automatic as long as the function is never referenced by your code it will be stripped from the code uploaded to your Arduino.

EDIT: The IDE will compile your code with a 'compiler' converting it to 'assembler' source which is passed to the 'assembler' which outputs 'object code' which is passed to the 'linker' which links your code with the Arduino library. The 'linker' will strip any code that your 'sketch' does not reference directly or indirectly.