Library.h
void Foo1(void); // Unused
int Foo2(int, int); // Used
char Foo3(char); // Unused
main.c
// ...
#include "Library.h"
// ...
void main(void)
{
int ret;
// ...
ret = Foo2(3, 7);
// ...
}
I have a library file which has a lot of function definitions in it. Will the generated machine code size increase because of the unused library functions? Or will the compiler optimize the code by ignoring those unused functions?
IDE: MPLAB 8.43
Compiler: MCC18 3.34
PIC: 18F2550