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.

Table 5-1. IAR Pragmas to MPLAB XC32 Equivalents
IAR Pragma (links to explanatory section)Suggested MPLAB XC32 Migration
BitfieldsIgnored by XC32
callsError by XC32
call_graph_rootNo simple migration recommended
cstat_disableNo simple migration recommended
cstat_enableNo simple migration recommended
cstat_restoreNo simple migration recommended
cstat_suppressNo simple migration recommended
data_alignment___attribute__((aligned(n)))
Default_function_attributesError by XC32
Default_no_boundsError by XC32
Default_variable_attributesError by XC32
Define_with_boundsError by XC32
Define_without_boundsError by XC32
Deprecated
__attribute__ ((deprecated))
      
__attribute__ ((deprecated(msg)))
    
Diag_defaultIgnored by XC32
Diag_errorIgnored by XC32
Diag_remarkIgnored by XC32
Diag_suppressIgnored by XC32
Diag_warningIgnored by XC32
Disable_checkError by XC32
ErrorError by XC32
Function_categoyError by XC32
Generate_entry_without_boundsError by XC32
Include_aliasError by XC32
Inline
inline
always_inline
never_inline
LanguageIgnored by XC32
Location
__attribute__((section,
    address))
MessageNot officially supported by XC32
No_arith_checksError by XC32
No_boundsError by XC32
No_stack_protectIgnored by XC32
Object_attributeIgnored by XC32
Optimize#pragma GCC optimize
PackNot officially supported by XC32
printf_argsNot officially supported by XC32
Public_equasm
RtmodelIgnored by XC32
__scanf_argsNot officially supported by XC32
Section__attribute_ (section())
Section_prefixError by XC32
Segment__attribute__(section())
Stack_protect__attribute__((stack_protect))
STDC_CX_LIMITED_RANGEIgnored by XC32
STDC_FENV_ACCESSError by XC32
STDC_FP_CONTRACTError by XC32
Svc_numberError by XC32
Type_attributeError by XC32
UnrollNot officially supported by XC32
VictorizeError by XC32
Weak__attribute__((weak))