5.50 Weak Pragma

The weak attribute causes the declaration to be emitted as a weak symbol. A weak symbol indicates that if a global version of the same symbol is available, that version should be used instead.

Suggested Replacement

__attribute__((weak))

Caveats

None.

Examples

Consider migrating IAR code such as:
#pragma weak foo
to MPLAB XC codes similar to:
extern int __attribute__((weak)) s;

Further Information

None.