Skip to main content

IAR Embedded Workbench for Arm 9.70.x

type_attribute

In this section:
Syntax
#pragma type_attribute=type_attr[ type_attr...]
Parameters

For information about type attributes that can be used with this pragma directive, see Type attributes.

Description

Use this pragma directive to specify IAR-specific type attributes, which are not part of Standard C. Note however, that a given type attribute might not be applicable to all kind of objects.

This directive affects the declaration of the identifier, the next variable, or the next function that follows immediately after the pragma directive.

In this example, thumb-mode code is generated for the function myFunc:

#pragma type_attribute=__thumb
void myFunc(void)
{
}

This declaration, which uses extended keywords, is equivalent:

__thumb void myFunc(void)
{
}
See also

Extended keywords.