C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-69
OLDCALLS
OLDCALLS
The OLDCALLS pragma controls how the TNS C compiler generates code for function
calls.
If you specify the OLDCALLS pragma, the TNS C compiler generates code for function
parameters such that the parameters are stacked with the last parameter first and the
first parameter last. Versions of the TNS C compiler released prior to C00 behave this
way.
If you specify NOOLDCALLS, the TNS C compiler generates code for function
parameters such that the parameters are stacked with the first parameter first and the
last parameter last. C00 and later versions of the TNS C compiler behave this way.
The pragma default settings are:
Usage Guidelines
•
The OLDCALLS pragma can be entered on the compiler RUN command line or in
the source text.
•
The OLDCALLS pragma has no affect if SYSTYPE OSS is specified; the compiler
ignores the pragma.
•
Versions of the TNS C compiler released with or after C00 and before D20.00
created automatic prototypes for nonprototyped functions. Because this behavior
violates the ISO/ANSI C standard, it is no longer supported.
•
The native C and C++ compilers do not support these pragmas. Native compilers
do not support B-series C language function-calling behavior.
[NO]OLDCALLS
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler NOOLDCALLS NOOLDCALLS
G-series TNS c89 utility NOOLDCALLS NOOLDCALLS
TNS/R native C and C++ compilers N.A. N.A.
Native c89 utility N.A. N.A.
TNS/E native C and C++ compilers N.A. N.A.