4.3.4 __location Keyword

Location can specify an absolute address, a register, or a user defined section.

Note: attribute((address(n))) can only specify absolute address. Also, attribute((section)) can specify a user defined section for global variables. The address and section attributes can be combined.

Suggested Replacement

__attribute__((address(n)))
__attribute__((section("n")))

Caveats

None.

Examples

Consider migrating IAR code such as:
#pragma location="FLASH"
char PORT2; /* PORT2 is located in section FLASH */
to MPLAB XC codes similar to:
int scanMode __attribute__((address(0x200)));

Further Information

None.