Code share: some of my util classes

mromani:
I think unreferenced code is stripped by the linker. Therefore you get into the final .hex file only the code that is actually called (to be precise, that appears to be called at compile time - there's no run-time analysis of dead codepaths, of course).

I was reading up on the underlying avr toolset and libraries and came across this page:
http://www.nongnu.org/avr-libc/user-manual/library.html

At the "How the linker works" section it describes how the linker uses complete object files to decide what to include and what not. So only if you write each function in a separate file, it cannot get optimized even when it is not in use. There goes the class file =(