mingw-woarm64-build icon indicating copy to clipboard operation
mingw-woarm64-build copied to clipboard

Investigate what to do with complex types

Open ZacWalk opened this issue 1 year ago • 3 comments

In MSVC complex numbers are represented in a non-standard way using a struct. In MSVC cexp is defined:

_Dcomplex cexp( _Dcomplex z );

Gcc uses the standard approach with a complex type builtin. In GCC cexp is defined as:

double complex cexp( double complex z );

These two approaches are incompatible but normally only a problem when you call a complex method. However lately we noticed some optimisations might replace cos/sin with cexp causing a crash.

My recommendation would be to disable optimisations that add cexp like this.

ZacWalk avatar Jan 31 '24 11:01 ZacWalk