HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)
#pragma assert non_zero(sizeof(s) == 8) "sizeof assert failed"
#pragma assert non_zero(offsetof(s,b) == 4) "offsetof assert failed"
This pragma provides a similar behavior to that of the Tru64 C compiler.
BINDING Pragma
#pragma BINDING {hidden|protected|extern|default}
Global symbols that follow this pragma will be given a specific binding. Command-line
options and binding pragmas referring to specific symbols (for example, pragma hidden
symbol) override this pragma. This pragma will override command-line bindings that do
not refer to a specific symbol (for example, -Bprotected).
DEFAULT_BINDING Pragma
#pragma DEFAULT_BINDING [symbol{,symbol}]
Global symbols are assigned the default export class. These symbols may be imported
or exported outside of the current load module. The compiler will access tentative and
undefined symbols through the linkage table. Any symbol that is not assigned to another
export class through use of another -B option will have the default export class.
ESTIMATED_FREQUENCY Pragma
#pragma ESTIMATED_FREQUENCY f
This block-scoped pragma allows you to tell the compiler your estimate of how frequently
the current block is executed as compared to the immediately surrounding block. You
can indicate the average trip count in the body of a for loop or the fraction of time a
then clause is executed. Frequency, f can be expressed as a floating point or integer
constant. The compiler accepts preprocessor expressions that evaluate to a compile time
constant.
EXTERN Pragma
#pragma EXTERN [symbol{,symbol}]
The specified symbols, or all undefined symbols if no list is provided, are assigned to
the default export class. Additionally, the compiler will inline the import stub for calls to
these symbols. No compile time binding of these symbols will be done. All references
to these symbols will be through the linkage table, so an unnecessary performance penalty
will occur if extern is applied to a listed symbol that is resolved in the same load
module. This is the pragma equivalent of -Bextern and is global in scope.
FREQUENTLY_CALLED Pragma
#pragma FREQUENTLY_CALLED [symbol{,symbol}]
This file-scoped pragma identifies functions that are frequently 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. FREQUENTLY_CALLED pragma is
Other Pragmas 129