[SAOC 25] improve importC weekly update 13
Emmanuel
emmankoko519 at gmail.com
Mon Dec 15 14:01:36 UTC 2025
Hi all,
This week, I fixed complex compile time error when used in tenary
operators.
```
void foo() {
double *a;
double _Complex *b;
double _Complex zden;
double c, d;
zden = c > d? b[0]: a[0];
}
```
in a tenary operator setup like this, DMD reported incompatible
types between the `double` nd the `double _Complex`. no common
type handler did not exist for complex types which expected for
the `double` to be type casted to `double _Complex`.
But then this fix led to more investigations as importC uses
complex library struct instead of the deprecated fundamental D
complex type. And I am still investigating other issues with
complex numbers to see if I will need to do that transition to
make C use fundamental complex.
More information about the Digitalmars-d
mailing list