aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2006-09-20 16:48:21 +0000
committerJanis Johnson <janis@gcc.gnu.org>2006-09-20 16:48:21 +0000
commit85a92f7ef5a476cbbf36e83bb20bb304c8478d34 (patch)
tree28375452ab91a8497231c3ebaaea0d0c1222d9b1
parent4e60515f9a6cb7a6c2fd59a9e3a1601a929deb92 (diff)
downloadgcc-85a92f7ef5a476cbbf36e83bb20bb304c8478d34.zip
gcc-85a92f7ef5a476cbbf36e83bb20bb304c8478d34.tar.gz
gcc-85a92f7ef5a476cbbf36e83bb20bb304c8478d34.tar.bz2
extend.texi (Decimal Float): Update for latest draft TR, clean up terminology.
* doc/extend.texi (Decimal Float): Update for latest draft TR, clean up terminology. From-SVN: r117085
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/extend.texi46
2 files changed, 36 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 640c4b9..86217ac 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-20 Janis Johnson <janis187@us.ibm.com>
+
+ * doc/extend.texi (Decimal Float): Update for latest draft TR,
+ clean up terminology.
+
2006-09-20 Steve Ellcey <sje@cup.hp.com>
PR target/28574
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 625c833..fe507f2 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -33,7 +33,7 @@ extensions, accepted by GCC in C89 mode and in C++.
* Conditionals:: Omitting the middle operand of a @samp{?:} expression.
* Long Long:: Double-word integers---@code{long long int}.
* Complex:: Data types for complex numbers.
-* Decimal Float:: Decimal Floating Point.
+* Decimal Float:: Decimal Floating Types.
* Hex Floats:: Hexadecimal floating-point constants.
* Zero Length:: Zero-length arrays.
* Variable Length:: Arrays whose length is computed at run time.
@@ -816,8 +816,8 @@ variables are named @code{foo$real} and @code{foo$imag}. You can
examine and set these two fictitious variables with your debugger.
@node Decimal Float
-@section Decimal Floating Point
-@cindex decimal floating point
+@section Decimal Floating Types
+@cindex decimal floating types
@cindex @code{_Decimal32} data type
@cindex @code{_Decimal64} data type
@cindex @code{_Decimal128} data type
@@ -828,25 +828,41 @@ examine and set these two fictitious variables with your debugger.
@cindex @code{DD} integer suffix
@cindex @code{DL} integer suffix
-GNU C supports decimal floating point types in addition to the
-standard floating-point types. This extension supports decimal
-floating-point arithmetic as defined in IEEE-754R, the proposed
-revision of IEEE-754. The C language extension is defined in ISO/IEC
-DTR 24732, Draft 5. Support for this functionality will change when
-it is accepted into the C standard and might change for new drafts
-of the proposal. Calling conventions for any target might also change.
-Not all targets support decimal floating point.
+As an extension, the GNU C compiler supports decimal floating types as
+defined in the N1176 draft of ISO/IEC WDTR24732. Support for decimal
+floating types in GCC will evolve as the draft technical report changes.
+Calling conventions for any target might also change. Not all targets
+support decimal floating types.
-Support for decimal floating point includes the arithmetic operators
+The decimal floating types are @code{_Decimal32}, @code{_Decimal64}, and
+@code{_Decimal128}. They use a radix of ten, unlike the floating types
+@code{float}, @code{double}, and @code{long double} whose radix is not
+specified by the C standard but is usually two.
+
+Support for decimal floating types includes the arithmetic operators
add, subtract, multiply, divide; unary arithmetic operators;
relational operators; equality operators; and conversions to and from
-integer and other floating-point types. Use a suffix @samp{df} or
+integer and other floating types. Use a suffix @samp{df} or
@samp{DF} in a literal constant of type @code{_Decimal32}, @samp{dd}
or @samp{DD} for @code{_Decimal64}, and @samp{dl} or @samp{DL} for
@code{_Decimal128}.
-Passing a decimal floating-point value as an argument to a function
-without a prototype is undefined.
+GCC support of decimal float as specified by the draft technical report
+is incomplete:
+
+@itemize @bullet
+@item
+Translation time data type (TTDT) is not supported.
+
+@item
+Characteristics of decimal floating types are defined in header file
+@file{decfloat.h} rather than @file{float.h}.
+
+@item
+When the value of a decimal floating type cannot be represented in the
+integer type to which it is being converted, the result is undefined
+rather than the result value specified by the draft technical report.
+@end itemize
Types @code{_Decimal32}, @code{_Decimal64}, and @code{_Decimal128}
are supported by the DWARF2 debug information format.