]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - bits/floatn-common.h
Update _FloatN header support for C++ in GCC 13
[thirdparty/glibc.git] / bits / floatn-common.h
index 92982d64601bc562733ffd64f9e88854407c16c7..67519dbb74144b27a82c8d30648498da75837d3a 100644 (file)
@@ -78,7 +78,7 @@
    or _FloatNx types, if __HAVE_<type> is 1.  The corresponding
    literal suffixes exist since GCC 7, for C only.  */
 # if __HAVE_FLOAT16
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 /* No corresponding suffix available for this type.  */
 #   define __f16(x) ((_Float16) x##f)
 #  else
@@ -87,7 +87,7 @@
 # endif
 
 # if __HAVE_FLOAT32
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   define __f32(x) x##f
 #  else
 #   define __f32(x) x##f32
@@ -95,7 +95,7 @@
 # endif
 
 # if __HAVE_FLOAT64
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   ifdef __NO_LONG_DOUBLE_MATH
 #    define __f64(x) x##l
 #   else
 # endif
 
 # if __HAVE_FLOAT32X
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   define __f32x(x) x
 #  else
 #   define __f32x(x) x##f32x
 # endif
 
 # if __HAVE_FLOAT64X
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   if __HAVE_FLOAT64X_LONG_DOUBLE
 #    define __f64x(x) x##l
 #   else
 # endif
 
 # if __HAVE_FLOAT128X
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   error "_Float128X supported but no constant suffix"
 #  else
 #   define __f128x(x) x##f128x
 
 /* Defined to a complex type if __HAVE_<type> is 1.  */
 # if __HAVE_FLOAT16
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
 #   define __CFLOAT16 __cfloat16
 #  else
@@ -145,7 +145,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
 # endif
 
 # if __HAVE_FLOAT32
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   define __CFLOAT32 _Complex float
 #  else
 #   define __CFLOAT32 _Complex _Float32
@@ -153,7 +153,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
 # endif
 
 # if __HAVE_FLOAT64
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   ifdef __NO_LONG_DOUBLE_MATH
 #    define __CFLOAT64 _Complex long double
 #   else
@@ -165,7 +165,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
 # endif
 
 # if __HAVE_FLOAT32X
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   define __CFLOAT32X _Complex double
 #  else
 #   define __CFLOAT32X _Complex _Float32x
@@ -173,7 +173,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
 # endif
 
 # if __HAVE_FLOAT64X
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   if __HAVE_FLOAT64X_LONG_DOUBLE
 #    define __CFLOAT64X _Complex long double
 #   else
@@ -185,7 +185,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
 # endif
 
 # if __HAVE_FLOAT128X
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   error "_Float128X supported but no complex type"
 #  else
 #   define __CFLOAT128X _Complex _Float128x
@@ -195,7 +195,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
 /* The remaining of this file provides support for older compilers.  */
 # if __HAVE_FLOAT16
 
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 typedef float _Float16 __attribute__ ((__mode__ (__HF__)));
 #  endif
 
@@ -210,7 +210,7 @@ typedef float _Float16 __attribute__ ((__mode__ (__HF__)));
 
 # if __HAVE_FLOAT32
 
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 typedef float _Float32;
 #  endif
 
@@ -234,7 +234,7 @@ typedef float _Float32;
 
 #  ifdef __NO_LONG_DOUBLE_MATH
 
-#   if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#   if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 typedef long double _Float64;
 #   endif
 
@@ -247,7 +247,7 @@ typedef long double _Float64;
 
 #  else
 
-#   if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#   if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 typedef double _Float64;
 #   endif
 
@@ -264,7 +264,7 @@ typedef double _Float64;
 
 # if __HAVE_FLOAT32X
 
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 typedef double _Float32x;
 #  endif
 
@@ -281,7 +281,7 @@ typedef double _Float32x;
 
 #  if __HAVE_FLOAT64X_LONG_DOUBLE
 
-#   if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#   if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 typedef long double _Float64x;
 #   endif
 
@@ -294,7 +294,7 @@ typedef long double _Float64x;
 
 #  else
 
-#   if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#   if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 typedef _Float128 _Float64x;
 #   endif
 
@@ -311,7 +311,7 @@ typedef _Float128 _Float64x;
 
 # if __HAVE_FLOAT128X
 
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+#  if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
 #   error "_Float128x supported but no type"
 #  endif