about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h b/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
index 6eaf8add26..70da85f2cb 100644
--- a/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
+++ b/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
@@ -23,8 +23,12 @@
 #ifdef __NO_LONG_DOUBLE_MATH
 # define iscanonical(x) ((void) (__typeof (x)) (x), 1)
 #else
+# if __LONG_DOUBLE_USES_FLOAT128 == 1
+# define __iscanonicall(x) ((void) (__typeof (x)) (x), 1)
+# else
 extern int __iscanonicall (long double __x)
      __THROW __attribute__ ((__const__));
+# endif
 # define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
 # define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
 # if __HAVE_DISTINCT_FLOAT128
@@ -50,7 +54,9 @@ extern "C++" {
 inline int iscanonical (float __val) { return __iscanonicalf (__val); }
 inline int iscanonical (double __val) { return __iscanonical (__val); }
 inline int iscanonical (long double __val) { return __iscanonicall (__val); }
-#  if __HAVE_DISTINCT_FLOAT128
+/* When using an IEEE 128-bit long double, _Float128 is defined as long double
+   in C++.  */
+#  if __HAVE_DISTINCT_FLOAT128 && __HAVE_FLOAT128_UNLIKE_LDBL
 inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); }
 #  endif
 }