HP C A.06.05 Reference Manual
Compiling and Running HP C Programs
Pragmas
Chapter 9 231
Optimization Pragmas
For additional information on the following optimization pragmas refer to HP aC++/HP C
Programmer's Guide.
FLOAT_TRAPS_ON Pragma
#pragma FLOAT_TRAPS_ON {
functionname,...functionname
}
#pragma FLOAT_TRAPS_ON {_ALL }
The FLOAT_TRAPS_ON pragma informs the compiler that you may have enabled floating-point
trap handling. When the compiler is so informed, it will not perform loop invariant code
motion (LICM) on floating-point operations in the functions named in the pragma. This
pragma is required for proper code generation when floating-point traps are enabled and the
code is optimized.
The _ALL parameter specifies that loop invariant code motion should be disabled for all
functions within the compilation unit.
[NO]INLINE Pragma
#pragma INLINE [
functionname
1
,...,
functionname
n
]
#pragma NOINLINE [
functionname
1
,...,
functionname
n
]
Enables (or disables) inlining of functions. If particular functions are specified with the
pragma, they are enabled (or disabled) for inlining. If no functions are specified with the
pragmas, all functions are enabled (or disabled) for inlining. Refer to the HP C/HP-UX
Programmer's Guide for details and examples.
NO_SIDE_EFFECTS Pragma
#pragma NO_SIDE_EFFECTS
functionname
1
,...,
functionname
n
States that
functionname
and all the functions that
functionname
calls will not modify any
of a program's local or global variables. This pragma provides additional information to the
optimizer which results in more efficient code. See the HP C/HP-UX Programmer's Guide for
further information.