[Dwarf-discuss] Re: adding new fundamental types to DWARF

Ron 603-884-2088 brender
Wed Mar 9 14:20:20 GMT 2005


Ben,

>> Do take a look at the outstanding issue 020401.1 in the DWARF
>> issues list (which Dave Anderson referred to). While it is titled
>> "Cobol Data Types", it would actually be better titled "Cobol,
>> Fixed Point and Scaled Data Types"--it does address everything I
>> have heard mentioned to date. In particular it includes new decimal,
>> binary and (arbitrary) small scale attributes for both new signed
>> fixed and unsigned fixed base types.
>
>> just worry about whether the functionality is right.
>
>I took a look as you suggested.  My understanding of modern COBOL is
>very limited, but I believe that there is only one 32-digit decimal
>floating point type in COBOL--is that right?

Well, it is one type if you think in terms of representation
scheme or multiple types if you think in terms of each possible
size (number of digits) or signedness (signed vs unsigned,
leading/trailing etc).

>The C proposal includes three decimal floating point types: _Decimal32,
>_Decimal64 and _Decimal128.  They are unlikely to be encoded as the COBOL
>type is--they use IEEE 754R.  While the text of this issue does contain
>the kinds of types you're referring to, I worry that it doesn't address
>the three C types we're concerned with (although, it could contain them).

You are quite right--I was following up some earlier comments
related to fixed point types that got me off the mark. I agree
that the COBOL decimal type(s) are not suitable for your purpose.

The big question in my mind is whether DWARF needs one decimal
floating encoding for C, or three? For example, DWARF has just
one (binary) floating point encoding, namely, DW_ATE_float. The C
types 'float', 'double' and 'long double' all use this same
encoding but have different DW_AT_byte_size attributes (typically
indicating 4, 8 and 16 bytes). I suspect that one decimal
floating encoding, perhaps named DW_ATE_decimal_float, would
suffice and be qualified by size in that same way?

Is that everything that needs to be considered? Or are there
other properties of decimal floating point types (beyond just
size) that should be addressed at the same time?

About all I know about IEEE 754R is that it involves decimal
(rather that binary) scale factors and rounding rules. To help
our understanding perhaps you know of a short overview that you
can provide for us or refer us to?

Ron





More information about the Dwarf-discuss mailing list