4 IAR Pragmas
This section shows a summary of IAR pragmas and the best MPLAB XC8 replacement where that is available. These pragmas and their MPLAB XC8 equivalents are discussed in more detail in the sections that follow. It is recommended that you compare the relevant sections in the MPLAB® XC8 C Compiler User's Guide for AVR MCUs 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 XC8 Migration |
---|---|
CX_RANGE_LIMITED | The pragma can be removed |
FENV_ACCESS | The pragma can be removed |
FP_CONTRACT | No simple migration recommended |
basic_template_matching | No simple migration recommended |
bitfields | No simple migration recommended |
call_graph_root | No simple migration recommended |
calls | No simple migration recommended |
constseg | Use the section attribute |
data_alignment | Use the aligned attribute |
dataseg | Use the section attribute |
default_function_attributes | Consider the section attribute |
default_variable_attributes | Consider the typedef specifier and section
attribute |
diag_xxxx | No simple migration recommended |
error | No simple migration recommended |
include_alias | No simple migration recommended |
inline | Use the always_inline or noinline
attribute |
language | No simple migration recommended |
location | Use the __at specifier and section
attribute |
message | No simple migration recommended |
object_attribute | Migrate individual attributes specified by this pragma |
optimize | No simple migration recommended |
printf_args | No simple migration recommended |
public_equ | Use the asm()
statement |
required | No simple migration recommended |
rtmodel | No simple migration recommended |
scanf_args | No simple migration recommended |
segment | The pragma can be removed |
type_attribute | Migrate individual attributes specified by this pragma |
vector | Use the __interrupt(number) specifier |
weak | Use the weak function attribute |