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

Table Of Contents
Compiling and Linking TNS/R Native C and C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
16-6
Using Link Options to Specify Floating-Point Format
When modifying an existing object file, TNS/R native linker sets the state as specified
by the -change floattype flag.
Link-Time Consistency Checking
The TNS/R native linker utility checks the consistency of floating-point type
combinations when linking object files. The checking differs according to whether the -
set flag is specified.
When the floattype attribute is not explicitly set with the -set flag, TNS/R native
linker uses the floattype attribute values of all the input object files for determining
the floattype attribute value for the output object file. If the consistency checks of
the input object files result in an invalid floating-point state or inconsistent value, an
error message is generated and no output object file is created.
Table 16-3 shows the results of each combination of floating-point states when the
floattype attribute is not explicitly specified. In the columns labeled IEEE, Tandem,
and Neutral are the number of input object files characterized by that floating-point
setting.
When the floattype attribute is explicitly specified with the -set flag, TNS/R native
linker sets the floattype attribute value for the output object file to that specified
value. If an inconsistency is detected, a warning message and an output object file are
generated. If the floating-point state is invalid, no output object file is created.
Any floating type combination is allowed if the user explicitly overrides the default with
the set floattype flag.
Table 16-3. Floating Point Consistency Check by TNS/R Native Linker Utility
Tandem IEEE Neutral Consistency Check Result
1 or more 0 0 or more No message is generated and the output object file
has TANDEM_FLOAT state.
0 1 or more 0 or more No message is generated and the output object file
has IEEE_FLOAT state.
1 or more 1 or more 0 or more Error message is generated. No output object file is
created.
0 0 1 or more No message is generated and the output object file
has NEUTRAL_FLOAT state.