4.3.15 __weak Keyword

Using the __weak object attribute on an external declaration of a symbol makes all references to that symbol in the module weak.

Using the __weak object attribute on a public definition of a symbol makes that definition a weak definition.

Suggested Replacement

__attribute__((weak))

Caveats

None.

Examples

Consider migrating IAR code such as:
extern __weak int foo; /* A weak reference. */ 
to MPLAB XC codes similar to:
extern int __attribute__((weak)) s;

Further Information

None.