- summary: externs removed if function unreferenced in C source --> PIC16: externs removed if function unreferenced in C source
The compiler does not emit an EXTERN directive into the assembly source for a function whose prototype is provided but that is not called in the C source, meaning if one attempts to call it in assembly source (including, for example, with DEF_HANDLER2 from signal.h), a "Symbol not previously defined" error results. Seeing as an assembly language EXTERN directive doesn't affect the generated code in any way, why not just leave them all in?
Log in to post a comment.