]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/x86/fpu/sfp-machine.h
math: x86: Avoid the use of __libgcc_cmp_return__ for __gcc_CMPtype
[thirdparty/glibc.git] / sysdeps / x86 / fpu / sfp-machine.h
index df8906acb479e8e90945947fa50191e12089afbc..fcbcf690531b7beb16626183729cb3d941f317a9 100644 (file)
@@ -1,10 +1,19 @@
 /* Configure soft-fp for building sqrtf128.  Based on sfp-machine.h in
    libgcc, with soft-float and other irrelevant parts removed.  */
 
+#if defined __x86_64__ && defined __ILP32__
+typedef long long int __gcc_CMPtype;
+#else
+typedef long int __gcc_CMPtype;
+#endif
+#if !defined(__clang__) && defined(__GNUC__)
 /* The type of the result of a floating point comparison.  This must
    match `__libgcc_cmp_return__' in GCC for the target.  */
-typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
-#define CMPtype __gcc_CMPtype
+typedef int __gcc_CMPtype_GCC __attribute__ ((mode (__libgcc_cmp_return__)));
+# define CMPtype __gcc_CMPtype
+_Static_assert(sizeof(__gcc_CMPtype) == sizeof(__gcc_CMPtype_GCC),
+              "sizeof(__gcc_CMPtype) != sizeof(__gcc_CMPtype_GCC)");
+#endif
 
 #ifdef __x86_64__
 # define _FP_W_TYPE_SIZE       64