5.1.3.3 Inlined Functions
There are several areas where the inlining of functions deviates from the C standard.
The standard states that an inline
function should only
be inlined in the translation unit in which it is defined. With MPLAB XC8, inlining can
occur in any module.
The standard indicates that if no extern
declaration is
provided in the same translation unit as an inline
function, then the
definition is an inlined definition. This also means that it does not provide an
external definition of that function and poses as an alternative to an external definition.
With this implementation, an external definition is implied by an inline
function.
The standard states that if an external definition is provided in addition
to an inline
definition, then it is unspecified which definition the
compiler should use in the translation unit of the inlined definition. With MPLAB XC8, a
function redefinition error will be emitted if both inline
and external
definitions are encountered.