From 6549b8a280d03061186f51170b4e4ab7b2c7fa05 Mon Sep 17 00:00:00 2001 From: Stefan Farfeleder Date: Fri, 3 Sep 2004 23:44:09 +0000 Subject: [PATCH] Add a workaround to recognise I/_Complex_I as complex arguments. Although the GCC manual claims that the expression 1.0fi has type float _Complex, __builtin_types_compatible_p(float _Complex, __typeof__(1.0fi))) yields 0. --- include/tgmath.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/tgmath.h b/include/tgmath.h index 71460adf813d..246a7ba595eb 100644 --- a/include/tgmath.h +++ b/include/tgmath.h @@ -64,7 +64,8 @@ #define __tg_is_complex(e1, e2, e3) \ (__tg_type3(e1, e2, e3, float _Complex) || \ __tg_type3(e1, e2, e3, double _Complex) || \ - __tg_type3(e1, e2, e3, long double _Complex)) + __tg_type3(e1, e2, e3, long double _Complex)) || \ + __tg_type3(e1, e2, e3, __typeof__(_Complex_I)) #define __tg_impl_simple(x, y, z, fn, fnf, fnl, ...) \ __builtin_choose_expr(__tg_type_corr(x, y, z, long double), \