C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-47
INLINE
When converting from fixed-point to floating-point format or from a floating-point
number to a narrower floating-point number, IEEE floating point typically rounds to
the nearest value according to the current IEEE floating-point rounding mode.
When converting from floating-point to fixed-point formats, IEEE floating-point
normally truncates the nearest representable value, as specified by the ANSI C
standard.
The IEEE floating-point standard requires a way to convert from floating point to
fixed point with rounding. To make this conversion, use the rint() function and
then cast the result to an integer type.
A new header file (ieeefp.h) has been introduced which contains interfaces that
apply only to IEEE floating point and are callable only when compiling using the
IEEE_FLOAT pragma. Calling the functions in ieeefp.h when generating TNS
floating-point code causes a syntax error because of incompatible floating-point
calling conventions. If you want to use any of the resources defined by ieeefp.h,
you must include it in your source.
For more details about compiling and linking programs that use IEEE floating-point
format, see Compiling and Linking Floating-Point Programs on page 16-4.
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:
[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++