-qdataimported, -qdatalocal, -qtocdata

Category

Optimization and tuning

Pragma equivalent

None.

Purpose

Marks data as local or imported.

Local variables are statically bound with the functions that use them. You can use the -qdatalocal option to name variables that the compiler can assume to be local. Alternatively, you can use the -qtocdata option to instruct the compiler to assume all variables to be local.

Imported variables are dynamically bound with a shared portion of a library. You can use the -qdataimported option to name variables that the compiler can assume to be imported. Alternatively, you can use the -qnotocdata option to instruct the compiler to assume all variables to be imported.

Syntax

Read syntax diagramSkip visual syntax diagram
          .-notocdata----------------------------------.     
          | .-dataimported-.                           |     
>>- -q--+-+-+--------------+--+----------------------+-+-+-----><
        |                     |    .-:-------------. |   |   
        |                     |    V               | |   |   
        |                     '-=----variable_name-+-'   |   
        '-+-tocdata-----------------------------+--------'   
          '-datalocal--+----------------------+-'            
                       |    .-:-------------. |              
                       |    V               | |              
                       '-=----variable_name-+-'              

Defaults

-qdataimported or -qnotocdata: The compiler assumes all variables are imported.

Parameters

variable_name
The name of a variable that the compiler should assume to be local or imported (depending on the option specified).

Specifying -qdataimported without any variable_name is equivalent to -qnotocdata: all variables are assumed to be imported. Specifying -qdatalocal without any variable_name is equivalent to -qtocdata: all variables are assumed to be local.

Usage

If any variables that are marked as local are actually imported, performance may decrease.

If you specify any of these options with no variables, the last option specified is used. If you specify the same variable name on more than one option specification, the last one is used.

Predefined macros

None.

Related information