aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/extend.texi
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-08-19 16:53:51 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2011-08-19 16:53:51 +0100
commitd4a83c103c7a266631bc93abcfebc2451a8d5dcd (patch)
tree6962b481efb1f6dbc36e80864a62800c7cd68b11 /gcc/doc/extend.texi
parenta6f969f4cb4b8363b2f20f942d36dd96906ba253 (diff)
downloadgcc-d4a83c103c7a266631bc93abcfebc2451a8d5dcd.zip
gcc-d4a83c103c7a266631bc93abcfebc2451a8d5dcd.tar.gz
gcc-d4a83c103c7a266631bc93abcfebc2451a8d5dcd.tar.bz2
c-parser.c (c_parser_postfix_expression): Handle RID_BUILTIN_COMPLEX.
* c-parser.c (c_parser_postfix_expression): Handle RID_BUILTIN_COMPLEX. * doc/extend.texi (__builtin_complex): Document. c-family: * c-common.c (c_common_reswords): Add __builtin_complex. * c-common.h (RID_BUILTIN_COMPLEX): New. testsuite: * gcc.dg/builtin-complex-err-1.c, gcc.dg/builtin-complex-err-2.c, gcc.dg/dfp/builtin-complex.c, gcc.dg/torture/builtin-complex-1.c: New tests. From-SVN: r177911
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r--gcc/doc/extend.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 786c18d..cf7fdbf 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -7511,6 +7511,18 @@ future revisions.
@end deftypefn
+@deftypefn {Built-in Function} @var{type} __builtin_complex (@var{real}, @var{imag})
+
+The built-in function @code{__builtin_complex} is provided for use in
+implementing the ISO C1X macros @code{CMPLXF}, @code{CMPLX} and
+@code{CMPLXL}. @var{real} and @var{imag} must have the same type, a
+real binary floating-point type, and the result has the corresponding
+complex type with real and imaginary parts @var{real} and @var{imag}.
+Unlike @samp{@var{real} + I * @var{imag}}, this works even when
+infinities, NaNs and negative zeros are involved.
+
+@end deftypefn
+
@deftypefn {Built-in Function} int __builtin_constant_p (@var{exp})
You can use the built-in function @code{__builtin_constant_p} to
determine if a value is known to be constant at compile-time and hence