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

The native compilers set the floating-point format type in the generated object file.
Two examples of compiling native C and C++ programs that use IEEE floating-point format:
NMC / IN SOURCEA, OUT $.#LIST / OBJECTA; IEEE_FLOAT
> NMCPLUS / IN SOURCEB, OUT $S.#LIST / OBJECTB; VERSION2, &
IEEE_FLOAT
Using Link Options to Specify Floating-Point Format
When linking object files using the TNS/R native linker utility, you can specify the floating-point
state of the output object file using the -set floattype flag. You can set any of these three
options: TANDEM_FLOAT, IEEE_FLOAT, or NEUTRAL_FLOAT. If the -set floattype flag is not
specified, the TNS/R native linker utility derives the floating-point state of the output object file from
the states of the input files.
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 43 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.
Table 43 Floating Point Consistency Check by TNS/R Native Linker Utility
Consistency Check ResultNeutralIEEETandem
No message is generated and the output object file has TANDEM_FLOAT
state.
0 or more01 or more
No message is generated and the output object file has IEEE_FLOAT state.0 or more1 or more0
Error message is generated. No output object file is created.0 or more1 or more1 or more
No message is generated and the output object file has NEUTRAL_FLOAT
state.
1 or more00
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 44 shows the results of each floating-point state when the floattype attribute is explicitly
specified.
Table 44 Floating-Point State as Determined by TNS/R Native Linker floattype Attribute
-set Neutral-set IEEE-set TandemNeutralIEEETandem
Warning message
is generated and
Warning message
is generated and
No message is
generated and
0 or more01 or more
the output object
Compiling and Linking Floating-Point Programs 289