aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Farfeleder <stefanf@FreeBSD.org>2004-09-03 23:44:09 +0000
committerStefan Farfeleder <stefanf@FreeBSD.org>2004-09-03 23:44:09 +0000
commit6549b8a280d03061186f51170b4e4ab7b2c7fa05 (patch)
tree2a9568e7014c6133df645c2e791eebdce07fe0ab
parenta551dea2a83ca2bd8ecf9bbb6cdf52280a078dcc (diff)
downloadsrc-6549b8a280d03061186f51170b4e4ab7b2c7fa05.tar.gz
src-6549b8a280d03061186f51170b4e4ab7b2c7fa05.zip
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.
Notes
Notes: svn path=/head/; revision=134736
-rw-r--r--include/tgmath.h3
1 files changed, 2 insertions, 1 deletions
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), \