Компилятор здесь не причем. Это линкер. Однако по умолчанию всё неиспользуемое в выходной файл он как раз и не помещает. Вот что по этому поводу написано в "EWARM Development Guide":
Цитата
KEEPING SYMBOLS AND SECTIONS
By default, ILINK removes any sections, section fragments, and global symbols that are
not needed by the application. To retain a symbol that does not appear to be needed—or
actually, the section fragment it is defined in—you can either use the root attribute on
the symbol in your C/C++ or assembler source code, or use the ILINK option --keep.
To retain sections based on attribute names or object names, use the directive keep in
the linker configuration file.
Мож Вам того, привиделось?