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.

Table 24-5. Support for Non-Standard Keywords
IAR Compatibility Mode
KeywordXC8XC16XC32
__section_beginignoresupportsupport
__section_endignoresupportsupport
__section_sizeignoresupportsupport
__segment_beginignoresupportsupport
__segment_endignoresupportsupport
__segment_sizeignoresupportsupport
__sfbignoresupportsupport
__sfeignoresupportsupport
__sfsignoresupportsupport
__asm or asm1support2native supportnative support
__armignoreignoreignore
__big_endianerrorerrorerror
__fiqsupporterrorerror
__intrinsicignoreignoreignore
__interworkignoreignoreignore
__irqsupporterrorerror
__little_endian3ignoreignoreignore
__nestedignoreignoreignore
__no_initsupportsupportsupport
__noreturnignoresupportsupport
__ramfuncignoreignore4support4
__packedignore5supportsupport
__rootignoresupportsupport
__swiignoreignoreignore
__taskignoresupportsupport
__weakignoresupportsupport
__thumbignoreignoreignore
__farfuncignoreignoreignore
__hugeignoreignoreignore
__nearfuncignoreignoreignore
__inlinesupportnative supportnative 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.