C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-39
HEADERS
°
Extensible and variable functions cannot be overloaded.
°
Extensible and variable functions cannot have default parameters.
°
Extensible and variable functions cannot be used in function templates and
member functions.
Examples
The following example shows the declaration for the C function myproc, which is a
TAL variable procedure with the externally visible procedure name MY^PROC:
void myproc (int);
#pragma function myproc (tal, variable, alias("MY^PROC"))
/* function declaration */
void myproc (int x)
/* function definition */
{ if ( x >= 0 )
Positive(x);
else
Negative(x);
}
HEADERS
The HEADERS pragma directs the native C and C++ compilers to print a list of included
header files.
The pragma default settings are:
Usage Guidelines
•
The HEADERS pragma must be entered on the compiler RUN command line, not in
the source text.
•
This pragma causes the compiler to act like a limited preprocessor. No
compilation is performed.
HEADERS
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