5 IAR Pragmas
This section shows a summary of IAR pragmas and the best MPLAB XC32 replacement where that is available. These pragmas and their MPLAB XC32 equivalents are discussed in more detail in the sections that follow. It is recommended that you compare the relevant sections in the MPLAB® XC32 C/C++ Compiler User's Guide with those in your IAR C/C++ Compiler User Guide to ensure that migrated code will work as expected in all situations.
IAR Pragma (links to explanatory section) | Suggested MPLAB XC32 Migration |
---|---|
Bitfields | Ignored by XC32 |
calls | Error by XC32 |
call_graph_root | No simple migration recommended |
cstat_disable | No simple migration recommended |
cstat_enable | No simple migration recommended |
cstat_restore | No simple migration recommended |
cstat_suppress | No simple migration recommended |
data_alignment | ___attribute__((aligned(n))) |
Default_function_attributes | Error by XC32 |
Default_no_bounds | Error by XC32 |
Default_variable_attributes | Error by XC32 |
Define_with_bounds | Error by XC32 |
Define_without_bounds | Error by XC32 |
Deprecated |
|
Diag_default | Ignored by XC32 |
Diag_error | Ignored by XC32 |
Diag_remark | Ignored by XC32 |
Diag_suppress | Ignored by XC32 |
Diag_warning | Ignored by XC32 |
Disable_check | Error by XC32 |
Error | Error by XC32 |
Function_categoy | Error by XC32 |
Generate_entry_without_bounds | Error by XC32 |
Include_alias | Error by XC32 |
Inline |
|
Language | Ignored by XC32 |
Location |
|
Message | Not officially supported by XC32 |
No_arith_checks | Error by XC32 |
No_bounds | Error by XC32 |
No_stack_protect | Ignored by XC32 |
Object_attribute | Ignored by XC32 |
Optimize | #pragma GCC optimize |
Pack | Not officially supported by XC32 |
printf_args | Not officially supported by XC32 |
Public_equ | asm |
Rtmodel | Ignored by XC32 |
__scanf_args | Not officially supported by XC32 |
Section | __attribute_ (section()) |
Section_prefix | Error by XC32 |
Segment | __attribute__(section()) |
Stack_protect | __attribute__((stack_protect)) |
STDC_CX_LIMITED_RANGE | Ignored by XC32 |
STDC_FENV_ACCESS | Error by XC32 |
STDC_FP_CONTRACT | Error by XC32 |
Svc_number | Error by XC32 |
Type_attribute | Error by XC32 |
Unroll | Not officially supported by XC32 |
Victorize | Error by XC32 |
Weak | __attribute__((weak)) |