5.8 data_alignment Pragma

It gives immediately following variable a stricter alignment of the start address.

On XC32, the closest representation to is ___attribute__((aligned)) which has a similar granularity.

Pack instead applies the specified alignment to all structs after its definition and not only the one immediately after it.

Suggested Replacement

___attribute__((aligned(n)))

Caveats

None.

Examples

Consider migrating IAR code such as:
#pragma data_alignment=2
to MPLAB XC codes similar to:
__attribute__((aligned (2))) 

Further Information

None.