5.1.2.1 Reentrancy
MPLAB XC8 C Compiler does not support function reentrancy for all devices.
This divergence from the C standard is due to there being no hardware implementation of a data stack on some devices. See Stacks for more information on the stack models used by the compiler for each device family.
Functions can be encoded reentrantly for Enhanced Mid-range and PIC18 devices, provided that the software stack or working registers are used for data. Recursive functions are also possible with these devices. Functions on baseline and other Mid-range devices cannot be made reentrant; however, the compiler can make functions called from main-line and interrupt code appear to be reentrant via a duplication feature. See Function Duplication for more about duplication.