SLAU132V October 2004 – February 2020
The FUNCTION_OPTIONS pragma allows you to compile a specific function in a C or C++ file with additional command-line compiler options. The affected function will be compiled as if the specified list of options appeared on the command line after all other compiler options. In C, the pragma is applied to the function specified. In C++, the pragma is applied to the next function.
The syntax of the pragma in C is:
#pragma FUNCTION_OPTIONS ( func, "additional options" ) |
The syntax of the pragma in C++ is:
#pragma FUNCTION_OPTIONS( "additional options" ) |
Supported options for this pragma are --opt_level, --auto_inline, --code_state, and --opt_for_speed. In order to use --opt_level and --auto_inline with the FUNCTION_OPTIONS pragma, the compiler must be invoked with some optimization level (that is, at least --opt_level=0).