Microchip Technology SW006023-2N データシート

ページ / 238
MPLAB
®
 XC32 C/C++ Compiler User’s Guide
DS51686E-page 124
 2012 Microchip Technology Inc.
To make effective use of absolute sections and the new best-fit allocator, standard 
program-memory and data-memory sections should not be mapped in the linker script. 
The built-in linker script does not map most standard sections such as the .text, 
.data
, .bss, or .ramfunc sections. By not mapping these sections in the linker 
script, we allow these sections to be allocated using the best-fit allocator rather than 
the sequential allocator. Sections that are unmapped in the linker script can flow around 
absolute sections, whereas sections that are linker-script mapped are grouped 
together and allocated sequentially, potentially causing conflicts with absolute sections.
alias (“symbol”)
Indicates that the function is an alias for another symbol. For example:
void foo (void) { /* stuff */ }
__attribute__ ((alias(“foo”))) void bar (void);
Symbol bar is considered to be an alias for the symbol foo.
always_inline
If the function is declared inline, always inline the function, even if no optimization 
level was specified.
at_vector
Place the body of the function at the indicated exception vector address. 
SeChapter 11. “Interrupts” and Section 11.5 “Exception Handlers”.
const
If a pure function determines its return value exclusively from its parameters (i.e., does 
not examine any global variables), it may be declared const, allowing for even more 
aggressive optimization. Note that a function which de-references a pointer argument 
is not const since the pointer de-reference uses a value which is not a parameter, 
even though the pointer itself is a parameter.
deprecated
deprecated (msg)
When a function specified as deprecated is used, a warning is generated. The 
optional msg argument, which must be a string, will be printed in the warning if present. 
The deprecated attribute may also be used for variables and types.
far
Always invoke the function by first loading its address into a register and then using the 
contents of that register. This allows calling a function located beyond the 28-bit 
addressing range of the direct CALL instruction.
format (type, format_index, first_to_check)
The format attribute indicates that the function takes a printf, scanf, strftime, 
or strfmon style format string and arguments and that the compiler should type check 
those arguments against the format string, just as it does for the standard library 
functions.
The type parameter is one of printf, scanf, strftime or strfmon (optionally with 
surrounding double underscores, e.g., __printf__) and determines how the format 
string will be interpreted.
The format_index parameter specifies which function parameter is the format string. 
Function parameters are numbered from the left-most parameter, starting from 1.