<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54308>54308</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang in Windows: #include <tgmath.h> lead to many error: passing '_Complex xxx' to parameter of incompatible type 'yyy'
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
pmor13
</td>
</tr>
</table>
<pre>
It may be a duplicate.
```
$ cat t3.c
#include <tgmath.h>
$ /cygdrive/d/SOFTWARE/LLVM/13.0.0/bin/clang.exe t3.c
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:72:50: error: passing '_Complex float' to parameter of incompatible type '_Fcomplex'
(aka 'struct _C_float_complex')
__tg_acos(float _Complex __x) {return cacosf(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:94:50: note: passing argument to parameter '_Z' here
_ACRTIMP _Fcomplex __cdecl cacosf(_In_ _Fcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:76:50: error: passing '_Complex double' to parameter of incompatible type '_Dcomplex'
(aka 'struct _C_double_complex')
__tg_acos(double _Complex __x) {return cacos(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:69:49: note: passing argument to parameter '_Z' here
_ACRTIMP _Dcomplex __cdecl cacos(_In_ _Dcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:80:56: error: passing '_Complex long double' to parameter of incompatible type '_Lcomplex'
(aka 'struct _C_ldouble_complex')
__tg_acos(long double _Complex __x) {return cacosl(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:119:52: note: passing argument to parameter '_Z' here
_ACRTIMP _Lcomplex __cdecl cacosl(_In_ _Lcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:101:50: error: passing '_Complex float' to parameter of incompatible type '_Fcomplex'
(aka 'struct _C_float_complex')
__tg_asin(float _Complex __x) {return casinf(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:97:50: note: passing argument to parameter '_Z' here
_ACRTIMP _Fcomplex __cdecl casinf(_In_ _Fcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:105:50: error: passing '_Complex double' to parameter of incompatible type '_Dcomplex'
(aka 'struct _C_double_complex')
__tg_asin(double _Complex __x) {return casin(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:72:49: note: passing argument to parameter '_Z' here
_ACRTIMP _Dcomplex __cdecl casin(_In_ _Dcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:109:56: error: passing '_Complex long double' to parameter of incompatible type '_Lcomplex'
(aka 'struct _C_ldouble_complex')
__tg_asin(long double _Complex __x) {return casinl(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:122:52: note: passing argument to parameter '_Z' here
_ACRTIMP _Lcomplex __cdecl casinl(_In_ _Lcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:130:50: error: passing '_Complex float' to parameter of incompatible type '_Fcomplex'
(aka 'struct _C_float_complex')
__tg_atan(float _Complex __x) {return catanf(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:99:50: note: passing argument to parameter '_Z' here
_ACRTIMP _Fcomplex __cdecl catanf(_In_ _Fcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:134:50: error: passing '_Complex double' to parameter of incompatible type '_Dcomplex'
(aka 'struct _C_double_complex')
__tg_atan(double _Complex __x) {return catan(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:74:49: note: passing argument to parameter '_Z' here
_ACRTIMP _Dcomplex __cdecl catan(_In_ _Dcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:138:56: error: passing '_Complex long double' to parameter of incompatible type '_Lcomplex'
(aka 'struct _C_ldouble_complex')
__tg_atan(long double _Complex __x) {return catanl(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:124:52: note: passing argument to parameter '_Z' here
_ACRTIMP _Lcomplex __cdecl catanl(_In_ _Lcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:159:52: error: passing '_Complex float' to parameter of incompatible type '_Fcomplex'
(aka 'struct _C_float_complex')
__tg_acosh(float _Complex __x) {return cacoshf(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:95:51: note: passing argument to parameter '_Z' here
_ACRTIMP _Fcomplex __cdecl cacoshf(_In_ _Fcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:163:52: error: passing '_Complex double' to parameter of incompatible type '_Dcomplex'
(aka 'struct _C_double_complex')
__tg_acosh(double _Complex __x) {return cacosh(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:70:50: note: passing argument to parameter '_Z' here
_ACRTIMP _Dcomplex __cdecl cacosh(_In_ _Dcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:167:58: error: passing '_Complex long double' to parameter of incompatible type '_Lcomplex'
(aka 'struct _C_ldouble_complex')
__tg_acosh(long double _Complex __x) {return cacoshl(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:120:53: note: passing argument to parameter '_Z' here
_ACRTIMP _Lcomplex __cdecl cacoshl(_In_ _Lcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:188:52: error: passing '_Complex float' to parameter of incompatible type '_Fcomplex'
(aka 'struct _C_float_complex')
__tg_asinh(float _Complex __x) {return casinhf(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:98:51: note: passing argument to parameter '_Z' here
_ACRTIMP _Fcomplex __cdecl casinhf(_In_ _Fcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:192:52: error: passing '_Complex double' to parameter of incompatible type '_Dcomplex'
(aka 'struct _C_double_complex')
__tg_asinh(double _Complex __x) {return casinh(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:73:50: note: passing argument to parameter '_Z' here
_ACRTIMP _Dcomplex __cdecl casinh(_In_ _Dcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:196:58: error: passing '_Complex long double' to parameter of incompatible type '_Lcomplex'
(aka 'struct _C_ldouble_complex')
__tg_asinh(long double _Complex __x) {return casinhl(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:123:53: note: passing argument to parameter '_Z' here
_ACRTIMP _Lcomplex __cdecl casinhl(_In_ _Lcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:217:52: error: passing '_Complex float' to parameter of incompatible type '_Fcomplex'
(aka 'struct _C_float_complex')
__tg_atanh(float _Complex __x) {return catanhf(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:100:51: note: passing argument to parameter '_Z' here
_ACRTIMP _Fcomplex __cdecl catanhf(_In_ _Fcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:221:52: error: passing '_Complex double' to parameter of incompatible type '_Dcomplex'
(aka 'struct _C_double_complex')
__tg_atanh(double _Complex __x) {return catanh(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:75:50: note: passing argument to parameter '_Z' here
_ACRTIMP _Dcomplex __cdecl catanh(_In_ _Dcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:225:58: error: passing '_Complex long double' to parameter of incompatible type '_Lcomplex'
(aka 'struct _C_ldouble_complex')
__tg_atanh(long double _Complex __x) {return catanhl(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:125:53: note: passing argument to parameter '_Z' here
_ACRTIMP _Lcomplex __cdecl catanhl(_In_ _Lcomplex _Z);
^
In file included from t3.c:1:
D:\SOFTWARE\LLVM\13.0.0\lib\clang\13.0.0\include\tgmath.h:246:48: error: passing '_Complex float' to parameter of incompatible type '_Fcomplex'
(aka 'struct _C_float_complex')
__tg_cos(float _Complex __x) {return ccosf(__x);}
^~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\complex.h:101:49: note: passing argument to parameter '_Z' here
_ACRTIMP _Fcomplex __cdecl ccosf(_In_ _Fcomplex _Z);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzdm9GOmzgUhp-G3FiDwAYCF7nIkIk02qm26lZbqTeRAw6w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