Table 14-1 lists the #pragma directives described in this chapter, along with a brief description of each and the compiler version in which they are supported.
Adds a .comment section to the object file and puts the supplied string inside the .comment section.
6.0 and later (-o32 only)
Identifies identifier as a function whose type was int in a previous release of the compilation system, but whose type is unsigned int in the MIPSpro compiler release.
7.0 and later
Allows certain preselected functions from math.h, stdio.h, and string.h to be inlined at a call site. Can also enable the compiler to get additional information about the function to improve execution efficiency.
7.0 and later
Indicates user level functions that have behavior similar to setjmp and getcontext .
|7.3 and later|
The syntax of #pragma ident is as follows:
#pragma ident “string”
string is the string you want to add to the .comment section in the object file. The string must be enclosed in double quotation marks.
|Caution: The #pragma ident directive is only available in -o32 mode.|
The syntax of #pragma int_to_unsigned is as follows:
#pragma int_to_unsigned function_name
#pragma int_to_unsigned is not currently supported in C++, except for symbols marked extern “C”.
This directive identifies function_name as a function whose type was int in a previous release of the compilation system, but whose type is unsigned int in the MIPSpro compiler release. The declaration of the identifier must precede the directive:
unsigned int strlen(const char*); #pragma int_to_unsigned strlen
This declaration makes it possible for the compiler to identify where the changed type may affect the evaluation of expressions.
The syntax of #pragma intrinsic is as follows:
#pragma intrinsic [function_name]
The #pragma unknown_control_flow directive indicates that the procedures listed as func1, func2, etc. have a nonstandard control flow behavior, such as setjmp or getcontext . This type of behavior interferes with optimizations such as tail call optimization.
The syntax of #pragma unknown_control_flow is as follows:
#pragma unknown_control_flow [func1 , [func2] ...]
This directive should appear after the external declaration of the function(s).