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

Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
13-49
INLINE_COMPILER_GENERATED_FUNCTIONS
standard ANSI code. It is necessary to revert to non-inline mode in order to
execute the locally defined function.
The following example, which applies only to TNS C and C++, shows how to mix
the inlined standard definition of strlen and a local version of strlen.
#include <stringh>
size_t strlen(char *p)
{
return -1; /* locally defined, always returns -1 */
}
main()
{
size_t i;
#pragma inline
i = strlen("abc"); /* i == 3 by standard ANSI
specification */
#pragma noinline
i = strlen("abc"); /* i == -1 locally defined */
}
INLINE_COMPILER_GENERATED_FUNCTIONS
The INLINE_COMPILER_GENERATED_FUNCTIONS command-line option allows all
compiler-generated functions to be inlined. The default behavior is that compiler-
generated functions are not inlined and are exported.
The pragma default settings are:
Usage Guidelines
INLINE_COMPILER_GENERATED_FUNCTIONS can be entered on the compiler
RUN command line (NMCPLUS) or be specified with the
-Winline_compiler_generated_functions flag of the c89 utility.
This pragma is only valid for TNS/R-target compilations.
INLINE_COMPILER_GENERATED_FUNCTIONS
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 N.A. N.A.