TNS/E Native Application Conversion Guide

C and C++ Conversion Tasks
TNS/E Native Application Conversion Guide529659-003
3-5
Using IEEE Floating Point Format
Using IEEE Floating Point Format
TNS C and C++ programs use the HP proprietary TNS floating-point format. The native
C and C++ compilers provide the option of using either the TNS or the IEEE floating-
point format. The default option is IEEE format. Programs that depend on TNS format
must specify the TANDEM_FLOAT pragma (or -Wtandem_float flag) when
converted to native mode. Differences between IEEE and TNS floating-point formats
include:
Results of IEEE floating-point operations might differ slightly from those of TNS
floating-point operations.
IEEE floating-point values can include not-a-number (NaN) and infinity.
The sign of 0.0 (zero) in IEEE format can be either positive or negative.
Replacing Obsolete External Function
Declarations
External function declarations declare functions not written in the C language. Current
TNS C compilers recognize correctly, but issue warnings for, C-series external function
declaration syntax with newer replacements. The native compilers do not recognize the
C-series syntax. If you use FUNCTION pragma syntax or declarations with _language
name keywords (such as _tal and _c), no changes are required. See the
C/C++
Programmer’s Guide
for details.
Replacing Obsolete Keywords
Current TNS C compilers recognize, but issue warnings for, certain C-series keywords
with newer replacements. The native C compiler does not recognize the C-series
keywords. Replace the following C-series keywords with the equivalent replacement
keywords:
C-Series Keyword Replacement
cc_status _cc_status
extensible _extensible
extptr See the following paragraph
lowmem _lowmem
tal _tal
variable _variable
myproc ="
alias-name
" _alias("
alias-name
") myproc
(or use the FUNCTION pragma syntax instead—see the
C/C++ Programmers Guide
for more information)