public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix the compiler mode used with C++ when -mabi=ieeelongdouble
@ 2018-04-27 17:12 Tulio Magno Quites Machado Filho
  2018-04-27 19:32 ` Joseph Myers
  0 siblings, 1 reply; 10+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2018-04-27 17:12 UTC (permalink / raw)
  To: libc-alpha; +Cc: meissner

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-05-11 23:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-27 17:12 [PATCH] powerpc: Fix the compiler mode used with C++ when -mabi=ieeelongdouble Tulio Magno Quites Machado Filho
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

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).