According to ChatGPT, MSVC2005 actually supports the removal of unused functions. However, also based on the chat bot answers, these feature was just added with this version:
- Compiler: /Gy
- Linker: /OPT:REF
However, this also mean, by default, no functions are removed. This means that even unreferenced functions stay.
Modern tools may optimize more automatically, but for us now it is actually good that this is not in any way active.