Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
216
Descriptions of pragma directives
AVR® IAR C/C++ Compiler
Reference Guide
Note: For portability reasons, some old-style pragma directives are recognized but will 
give a diagnostic message. It is important to be aware of this if you need to port existing 
code that contains any of those pragma directives. For additional information, see the 
AVR® IAR Embedded Workbench Migration Guide.
Descriptions of pragma directives
This section gives detailed information about each pragma directive.
All pragma directives using 
=
 for value assignment should be entered like:
#pragma pragmaname=pragmavalue
or
#pragma pragmaname = pragmavalue
 
#pragma
 
basic_template_matching
#pragma basic_template_matching
Use this pragma directive in front of a template function declaration to make the 
function fully memory-aware, in the rare cases where this is useful. That template 
function will then match the template without the modifications described in Templates 
and data memory attributes
, page 116.
Example
#pragma basic_template_matching
template<typename T> void fun(T *);
fun((int _ _near *) 0); // T = int _ _near
#pragma object_attribute
Changes the definition of a variable or a function
#pragma optimize
Specifies type and level of optimization
#pragma pack
Specifies the alignment of structures and union members
#pragma required
Ensures that a symbol which is needed by another symbol is 
present in the linked output
#pragma rtmodel
Adds a runtime model attribute to the module
#pragma segment
Declares a segment name to be used by intrinsic functions
#pragma type_attribute
Changes the declaration and definitions of a variable or 
function
#pragma vector
Specifies the vector of an interrupt function
Pragma directive
Description
Table 69: Pragma directives summary (Continued)