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

Compiling and Linking TNS/R Native C and C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
16-6
Using Link Options to Specify Floating-Point Format
When modifying an existing object file, nld or ld sets the state as specified by the -
change floattype flag.
Link-Time Consistency Checking
The nld or ld 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, nld or ld 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, Floating Point Consistency Check by nld or ld Utility, 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, nld or ld
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-4, Floating-Point State as Determined by nld or ld floattype Attribute shows
the results of each floating-point state when the floattype attribute is explicitly
specified.
Table 16-3. Floating Point Consistency Check by nld or ld 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.