public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
To: libc-alpha@sourceware.org
Cc: meissner@linux.ibm.com
Subject: [PATCH] powerpc: Fix the compiler mode used with C++ when -mabi=ieeelongdouble
Date: Fri, 27 Apr 2018 17:12:00 -0000	[thread overview]
Message-ID: <20180427171150.28010-1-tuliom@linux.ibm.com> (raw)

When compiling C++  code with -mabi=ieeelongdouble, KCtype is
unavailable and TCtype should be used instead.

2018-04-27  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>

	* sysdeps/powerpc/bits/floatn.h [__HAVE_FLOAT128
	&& (!__GNUC_PREREQ (7, 0) || defined __cplusplus)
	&& __LDBL_MANT_DIG__ == 113] (__cfloat128): Use compiler mode __TC__.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
---
 sysdeps/powerpc/bits/floatn.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sysdeps/powerpc/bits/floatn.h b/sysdeps/powerpc/bits/floatn.h
index c3834096e3..9ba1b81380 100644
--- a/sysdeps/powerpc/bits/floatn.h
+++ b/sysdeps/powerpc/bits/floatn.h
@@ -66,10 +66,14 @@
 
 /* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.  */
 # if __HAVE_FLOAT128
+/* Add a typedef for older GCC and C++ compilers which don't natively support
+   _Complex _Float128..  */
 #  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-/* Add a typedef for older GCC compilers which don't natively support
-   _Complex _Float128.  */
+#   if __LDBL_MANT_DIG__ == 113
+typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
+#   else
 typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__KC__)));
+#   endif
 #   define __CFLOAT128 __cfloat128
 #  else
 #   define __CFLOAT128 _Complex _Float128
-- 
2.14.3

             reply	other threads:[~2018-04-27 17:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 17:12 Tulio Magno Quites Machado Filho [this message]
2018-04-27 19:32 ` Joseph Myers
2018-04-30 14:02   ` Tulio Magno Quites Machado Filho
2018-04-30 14:05     ` Tulio Magno Quites Machado Filho
2018-04-30 14:52     ` Joseph Myers
2018-05-04 20:21       ` Tulio Magno Quites Machado Filho
2018-05-04 21:06         ` Joseph Myers
2018-05-11 19:25           ` [PATCHv2] powerpc: Fix the compiler type " Tulio Magno Quites Machado Filho
2018-05-11 19:56             ` Joseph Myers
2018-05-11 23:23               ` Tulio Magno Quites Machado Filho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180427171150.28010-1-tuliom@linux.ibm.com \
    --to=tuliom@linux.ibm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=meissner@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).