summaryrefslogtreecommitdiff
path: root/gcc/doc/extend.texi
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r--gcc/doc/extend.texi31
1 files changed, 26 insertions, 5 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 5285e002d7e..5124883ae5c 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -927,6 +927,8 @@ examine and set these two fictitious variables with your debugger.
@node Floating Types
@section Additional Floating Types
@cindex additional floating types
+@cindex @code{_Float@var{n}} data types
+@cindex @code{_Float@var{n}x} data types
@cindex @code{__float80} data type
@cindex @code{__float128} data type
@cindex @code{__ibm128} data type
@@ -935,9 +937,19 @@ examine and set these two fictitious variables with your debugger.
@cindex @code{W} floating point suffix
@cindex @code{Q} floating point suffix
-As an extension, GNU C supports additional floating
+ISO/IEC TS 18661-3:2015 defines C support for additional floating
+types @code{_Float@var{n}} and @code{_Float@var{n}x}, and GCC supports
+these type names; the set of types supported depends on the target
+architecture. These types are not supported when compiling C++.
+Constants with these types use suffixes @code{f@var{n}} or
+@code{F@var{n}} and @code{f@var{n}x} or @code{F@var{n}x}. These type
+names can be used together with @code{_Complex} to declare complex
+types.
+
+As an extension, GNU C and GNU C++ support additional floating
types, @code{__float80} and @code{__float128} to support 80-bit
-(@code{XFmode}) and 128-bit (@code{TFmode}) floating types.
+(@code{XFmode}) and 128-bit (@code{TFmode}) floating types; these are
+aliases for the type names @code{_Float64x} and @code{_Float128}.
Support for additional types includes the arithmetic operators:
add, subtract, multiply, divide; unary arithmetic operators;
relational operators; equality operators; and conversions to and from
@@ -954,9 +966,11 @@ typedef _Complex float __attribute__((mode(TC))) _Complex128;
typedef _Complex float __attribute__((mode(XC))) _Complex80;
@end smallexample
-In order to use @code{__float128} and @code{__ibm128} on PowerPC Linux
+In order to use @code{_Float128}, @code{__float128} and
+@code{__ibm128} on PowerPC Linux
systems, you must use the @option{-mfloat128}. It is expected in
-future versions of GCC that @code{__float128} will be enabled
+future versions of GCC that @code{_Float128} and @code{__float128}
+will be enabled
automatically. In addition, there are currently problems in using the
complex @code{__float128} type. When these problems are fixed, you
would use the following syntax to declare @code{_Complex128} to be a
@@ -976,7 +990,14 @@ Not all targets support additional floating-point types.
IA-64 targets. The @code{__float128} type is supported on hppa HP-UX.
The @code{__float128} type is supported on PowerPC 64-bit Linux
systems by default if the vector scalar instruction set (VSX) is
-enabled.
+enabled. The @code{_Float128} type is supported on all systems where
+@code{__float128} is supported or where @code{long double} has the
+IEEE binary128 format. The @code{_Float64x} type is supported on all
+systems where @code{__float128} is supported. The @code{_Float32}
+type is supported on all systems supporting IEEE binary32; the
+@code{_Float64} and @code{Float32x} types are supported on all systems
+supporting IEEE binary64. GCC does not currently support
+@code{_Float16} or @code{_Float128x} on any systems.
On the PowerPC, @code{__ibm128} provides access to the IBM extended
double format, and it is intended to be used by the library functions