#1717 PIC16: externs removed if function unreferenced in C source

open
nobody
PIC16
5
2013-07-16
2010-11-27
Christopher Head
No

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?

Discussion

  • Maarten Brock
    Maarten Brock
    2011-09-15

    • summary: externs removed if function unreferenced in C source --> PIC16: externs removed if function unreferenced in C source
     
    • Category: --> PIC16