C/C++ Programmer's Guide (G06.25+)

Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
13-48
INLINE
INLINE
For TNS C programs, the INLINE pragma controls whether the compiler generates
inline code for certain standard library functions instead of generating a function call.
INLINE directs the compiler to generate inline code. NOINLINE directs the compiler to
revert to the library function call.
For native C++ programs, the INLINE pragma controls whether functions declared
inline are actually generated inline. NOINLINE suppresses inline generation of all
functions. INLINE causes the compiler to attempt to generate inline code for functions
declared inline.
The purpose of the INLINE pragma is to provide more efficient code generation.
The pragma default settings are:
Usage Guidelines
For the native C++ compiler, the INLINE pragma must be entered on the compiler
RUN command line. For TNS C and c89 in the OSS environment, the pragmas
can be entered on the compiler RUN command line or specified with the
-W[no]inline flag of the c89 utility.
For the TNS/E native compiler, inlining is not performed for optimization level 0.
For TNS C programs, the following functions are affected by the INLINE pragma:
strlen(), strcat(), strcmp(), strcpy(), abs(), labs(), memchr(),
memcmp(), memcpy(), and memset().
When compiling with the INLINE pragma, the maximum string limit size for the
strlen(), strcat(), and strcpy() functions is 65,535 bytes. When the
NOINLINE pragma is in effect, the string limit size is 32,767 bytes.
When the INLINE pragma is in effect and a program contains a locally defined
function that has the same name as one of the functions that are affected by the
INLINE pragma, the compiler overrides the locally defined function with the
[NO]INLINE
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler NOINLINE NOINLINE
G-series TNS c89 utility NOINLINE NOINLINE
TNS/R native C and C++ compilers N.A. for C,
INLINE
for C++
N.A. for C,
INLINE for C++
Native c89 utility N.A. for C,
INLINE
for C++
N.A. for C,
INLINE for C++
TNS/E native C and C++ compilers N.A. for C,
INLINE
for C++
N.A. for C,
INLINE for C++