24.5 Extended Keywords
Non-standard extensions often specify how objects are defined or accessed. Keywords are usually used to indicate the feature. The non-standard C keywords corresponding to other compilers are listed in the table below, as well as the level of compatibility offered by MPLAB XC compilers. The table notes offer more information about some extensions.
IAR Compatibility Mode | |||
---|---|---|---|
Keyword | XC8 | XC16 | XC32 |
__section_begin | ignore | support | support |
__section_end | ignore | support | support |
__section_size | ignore | support | support |
__segment_begin | ignore | support | support |
__segment_end | ignore | support | support |
__segment_size | ignore | support | support |
__sfb | ignore | support | support |
__sfe | ignore | support | support |
__sfs | ignore | support | support |
__asm or
asm 1 | support2 | native support | native support |
__arm | ignore | ignore | ignore |
__big_endian | error | error | error |
__fiq | support | error | error |
__intrinsic | ignore | ignore | ignore |
__interwork | ignore | ignore | ignore |
__irq | support | error | error |
__little_endian 3 | ignore | ignore | ignore |
__nested | ignore | ignore | ignore |
__no_init | support | support | support |
__noreturn | ignore | support | support |
__ramfunc | ignore | ignore4 | support4 |
__packed | ignore5 | support | support |
__root | ignore | support | support |
__swi | ignore | ignore | ignore |
__task | ignore | support | support |
__weak | ignore | support | support |
__thumb | ignore | ignore | ignore |
__farfunc | ignore | ignore | ignore |
__huge | ignore | ignore | ignore |
__nearfunc | ignore | ignore | ignore |
__inline | support | native support | native support |
1 All assembly code specified by this construct is
device-specific and will need review when porting to any Microchip
device.
2 The keyword, asm, is supported
natively by MPLAB XC8, but this compiler only supports the
__asm
keyword in IAR compatibility mode.3 This is
the default (and only) endianism used by all MPLAB XC
compilers.
4 When used with MPLAB XC32, this
must be used with the
__longcall__
macro for full
compatibility.5 Although this keyword is ignored,
by default, all structures are packed when using MPLAB XC8, so there is no
loss of functionality.