5.14 Deprecated Pragma
If you place this pragma directive immediately before the declaration of a type, variable, function, field, or constant, any use of that type, variable, function, field, or constant will result in a warning.
In XC32, you can also specific a message along with the deprecation warning using an attribute.
Suggested Replacement
__attribute__ ((deprecated))
__attribute__ ((deprecated(msg)))
Caveats
None.
Examples
Consider migrating IAR code such as:
#pragma deprecated
extern int fun(void); // function fun is deprecated
to MPLAB XC codes similar to:
__attribute__((deprecated)) int fun(void);Further Information
None.