POP Pragma

#pragma POP

The last pushed pragma is removed from the pragma stack and state is restored. The binding state reverts to the binding state prior to the last push. Note that this pragma can only be used with the blanket binding pragmas.

Pragma (once)

_Pragma ("once")

The _Pragma ("once") operator is equivalent to #pragma once. This operator ensures that the source file is included only once during compilation.

PROTECTED Pragma

#pragma PROTECTED [symbol {,symbol}]

The specified symbols, or all symbols (if no symbols are specified), are assigned the PROTECTED export class. That means these symbols will not be preempted by symbols from other load modules, so the compiler may bypass the linkage table for both code and data references and bind them to locally defined code and data symbols. This pragma is equivalent to -Bprotectedand is global in scope.

PTRS_STRONGLY_TYPED Pragma

#pragma [NO]PTRS_STRONGLY_TYPED {BEGIN END}

This pragma turns strong pointer type testing on and off When turned on (BEGIN) if a pointer typing error is detected, it will generate a warning if the typing error can be safely ignored. If the typing error cannot be safely ignored, it will generate a warning and flag the compilation appropriately, or if this is not possible, it will generate an error. This feature is disabled using the END attribute..

PTRS_TO_GLOBALS Pragma

#pragma [NO]PTRS_TO_GLOBALS name

This pragma aids alias analysis. It must be specified at global scope and immediately precede the declaration of the variable or entry named. The pragma tells the optimizer whether the global variable or entry name is accessed [is not accessed] through pointers. If NOPTRS_TO_GOBALS is specified, it is assumed that statically-allocated data (including file-scoped globals, file scoped statics, and function-scoped static variables) will not be read or written through pointers. The default is PTRS_TO_GLOBALS.

PUSH Pragma

#pragma PUSH pragma_name

This pragma will save the current state on the pragma stack for the named pragma. All subsequent uses of the named binding pragma will be reverted when the “POP” is encountered. Note that this pragma can only be used with the blanket binding pragmas.

RARELY_CALLED Pragma

#pragma RARELY_CALLED [symbol{,symbol}]

This file-scoped pragma identifies functions that are rarely called within the application. The pragma must be placed prior to any definition of or reference to the named function. If not, the behavior is undefined. RARELY_CALLED is independent of +Oprofile=use option. It overrides any dynamically obtained profile information.

108 Pragma Directives and Attributes