C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-71
ONCE
ONCE
The ONCE pragma specifies that the file containing this pragma will be compiled only 
once during the compilation, even if it is included multiple times.
There is no default setting for this pragma.
Usage Guidelines
•
This pragma applies to native commpilations only.
•
The ONCE pragma can be specified only in the source code.
•
Use the ONCE pragma only in header files. 
OPTFILE
The OPTFILE pragma specifies an optimizer file, which contains a list of functions that 
are to be optimized at the level specified in the file. Functions that are not in this list are 
optimized at the level given in the RUN command line or in the -Woptimize flag of 
the c89 utility.
file-name
is the name of an EDIT file.
The pragma default settings are:
Usage Guidelines
•
For the native C and C++ compilers, the OPTFILE pragma can be entered only on 
the compiler RUN command line. For OSS, the -Woptfile option pragma can be 
entered only in the c89 command line.
ONCE
Note. Do not use the #pragma ONCE in a header file that contains the #pragma SECTION. 
The expected behavior of this combination is undefined.
OPTFILE "file-name"
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler N.A. N.A.
G-series TNS c89 utility N.A. N.A.
TNS/R native C and C++ compilers  Not set Not set
Native c89 utility Not set Not set
TNS/E native C and C++ compilers  Not set Not set










