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

Even if the user library is marked with a floattype attribute that conflicts with the program file,
the program can use the library if it does not call anything in the user library that uses floating
point. In this case, you need to mark the program file with the eld -set float_lib_overrule
on command to disregard the floattype attribute of the user library file.
In fact, the run-time consistency check can be overruled by using the -set float_lib_overrule
on flag of the eld utility. If you overrule the consistency check, the operating system allows a
floating-point inconsistency between the user library and the program. If you do not set
float_lib_overrule, and there is an inconsistency between the program file and user library,
the operating system generates an error code and does not run the program.
Linking Mixed-Language Programs
When linking mixed-language programs that use IEEE floating-point format, specify the -set
floattype IEEE flag using the eld utility.
For example, if you have a mixed-language program composed of a C module that uses IEEE
floating-point format, and a COBOL module that doesn’t use floating point but is marked by the
native COBOL compiler as TANDEM_FLOAT, then you could use the eld -set floattype
IEEE_FLOAT command. Or you could first use the eld -change command to change the COBOL
object file to NEUTRAL_FLOAT.
This example illustrates linking a mixed-language program that uses IEEE floating-point format:
> ELD $SYSTEM.SYSTEM.CCPLMAIN COBJ EPTALOBJ &
-set floattype ieee_float -o MYEXEC
In this example, the native C object file named COBJ uses IEEE floating-point format, and the
EPTAL-created object file named EPTALOBJ uses Tandem floating-point format. (Note that EPTAL
supports only Tandem floating-point format.) To link these modules, you must specify the -set
floattype IEEE_FLOAT flag. If this flag is not specified, eld generates error messages because
of the mismatch between Tandem and IEEE floating-point formats. When this flag is specified, eld
generates a warning message about the mismatch and builds the executable file MYEXEC.
CCPLMAIN (an object file) is a standard item, required when linking C programs.
Use the -set and -change flags of the eld utility to set or change the float_lib_overrule
attribute when creating object files. If the float_lib_overrule is specified more than once by
either the -set or -change flags, all occurrences except the last one are ignored. The
float_lib_overrule attribute can be changed only for executable files. An error occurs if an
attempt is made to change the value of this attribute for relinkable files.
For More Information
See these manual for more details about using floating-point formats:
Guardian Programmer’s Guide for information about building programs using IEEE floating-point
format
Guardian Procedure Calls Reference Manual for information about operating mode routines
and routines for converting between Tandem and IEEE floating-point formats
The descriptions of pragmas IEEE_FLOAT (page 203) and TANDEM_FLOAT (page 251).
Working in the Guardian Environment
In the Guardian environment, you can compile and link programs for either the Guardian or Open
System Services (OSS) environment.
304 Compiling and Linking TNS/E Native C and C++ Programs