-qisolated_call

Description

Specifies functions in the source file that have no side effects.

Syntax

Read syntax diagramSkip visual syntax diagram                          .-:-------------.
                          V               |
>>- -q--isolated_call--=----function_name-+--------------------><

where:

function_name Is the name of a function that does not have side effects, except changing the value of a variable pointed to by a pointer or reference parameter, or does not rely on functions or processes that have side effects.

Side effects are any changes in the state of the runtime environment. Examples of such changes are accessing a volatile object, modifying an external object, modifying a file, or calling another function that does any of these things. Functions with no side effects cause no changes to external and static variables.

function_name can be a list of functions separated by colons (:).

See also #pragma isolated_call and #pragma options.

Notes

Marking a function as isolated can improve the runtime performance of optimized code by indicating the following to the optimizer:

The #pragma options isolated_call directive must be specified at the top of the file, before the first C or C++ statement. You can use the #pragma isolated_call directive at any point in your source file.

If a function is incorrectly identified as having no side effects, the resultant program behavior might be unexpected or produce incorrect results.

Example

To compile myprogram.c, specifying that the functions myfunction(int) and classfunction(double) do not have side effects, enter:

xlc myprogram.c -qisolated_call=myfunction:classfunction

Related information