HP C A.06.05 Reference Manual

Preprocessing Directives
Pragma Directive (#pragma)
Chapter 7 199
Pragma Directive (#pragma)
You can provide instructions to the compiler through inclusion of pragmas.
Syntax
pragma-directive
::=
#pragma
replacement-list
Description
The #pragma preprocessing directive provides implementation-dependent information to the
compiler. See Chapter 9, “Compiling and Running HP C Programs,” on page 207 for
descriptions of pragmas recognized by HP C/HP-UX. Any pragma that is not recognized by
the compiler is ignored.
Example
#pragma OPTIMIZE ON
#pragma OPTIMIZE OFF
This pragma is used to toggle optimization on/off for different sections of source code as these
pragmas are encountered in a top to bottom read of a source file.