Jump to page: 1 2
Thread overview
[Issue 24187] dmd ImportC: cmathcalls.h(55): Error: illegal type combination
Oct 14, 2023
mw
Oct 14, 2023
mw
Oct 18, 2023
Walter Bright
Oct 18, 2023
mw
Oct 18, 2023
mw
Oct 29, 2023
Walter Bright
Oct 30, 2023
mw
Oct 30, 2023
mw
Oct 30, 2023
Walter Bright
Oct 30, 2023
Walter Bright
[Issue 24187] ImportC: _Float32 not defined
Oct 30, 2023
Walter Bright
Oct 30, 2023
Dlang Bot
Oct 30, 2023
mw
Oct 30, 2023
Dlang Bot
Nov 04, 2023
mw
Nov 06, 2023
Walter Bright
Nov 06, 2023
mw
Nov 11, 2023
Walter Bright
Nov 12, 2023
mw
October 14, 2023
https://issues.dlang.org/show_bug.cgi?id=24187

--- Comment #1 from mw <mingwu@gmail.com> ---
Steps to reproduce:

$ tar xzf s7.tar.gz
$ cd s7
$ dmd s7.c

BTW, LDC2 has the same error, because it share the same front end with DMD.

--
October 14, 2023
https://issues.dlang.org/show_bug.cgi?id=24187

--- Comment #1 from mw <mingwu@gmail.com> ---
Steps to reproduce:

$ tar xzf s7.tar.gz
$ cd s7
$ dmd s7.c

BTW, LDC2 has the same error, because it share the same front end with DMD.

--
October 18, 2023
https://issues.dlang.org/show_bug.cgi?id=24187

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
My Linux machine apparently has a different cmathcalls.h file than yours. If you could isolate the source code that causes this problem, that would be most helpful.

--
October 18, 2023
https://issues.dlang.org/show_bug.cgi?id=24187

--- Comment #3 from mw <mingwu@gmail.com> ---
I can upload the generated s7.i on my machine, do you think it will helpful?

--
October 18, 2023
https://issues.dlang.org/show_bug.cgi?id=24187

--- Comment #4 from mw <mingwu@gmail.com> ---
Created attachment 1895
  --> https://issues.dlang.org/attachment.cgi?id=1895&action=edit
s7.i.gz attached. dmd s7.i shows the same error.

s7.i.gz attached. dmd s7.i shows the same error.

--
October 29, 2023
https://issues.dlang.org/show_bug.cgi?id=24187

--- Comment #5 from Walter Bright <bugzilla@digitalmars.com> ---
Thank you. What would be even more helpful would be to cut it down to just what produces the error!

--
October 30, 2023
https://issues.dlang.org/show_bug.cgi?id=24187

--- Comment #6 from mw <mingwu@gmail.com> ---
Haha, I made it: 2 lines!


$ cat s2.i
extern _Complex _Float32 cacosf32 (_Complex _Float32 __z) __attribute__
((__nothrow__ , __leaf__)); extern _Complex _Float32 __cacosf32 (_Complex
_Float32 __z) __attribute__ ((__nothrow__ , __leaf__));
extern _Complex _Float32x cacosf32x (_Complex _Float32x __z) __attribute__
((__nothrow__ , __leaf__)); extern _Complex _Float32x __cacosf32x (_Complex
_Float32x __z) __attribute__ ((__nothrow__ , __leaf__));


$ gcc -c s2.i  # ok
$ dmd s2.i
s2.i(1): Error: illegal type combination
s2.i(1): Error: missing comma or semicolon after declaration of `_Float32`,
found `cacosf32` instead
s2.i(1): Error: illegal type combination
s2.i(1): Error: missing comma or semicolon after declaration of `_Float32`,
found `__cacosf32` instead
s2.i(2): Error: illegal type combination
s2.i(2): Error: missing comma or semicolon after declaration of `_Float32x`,
found `cacosf32x` instead
s2.i(2): Error: illegal type combination
s2.i(2): Error: missing comma or semicolon after declaration of `_Float32x`,
found `__cacosf32x` instead


I will attach s2.i.

But if you fix s2.i, pls also try if the fix works for s7.i.gz.

--
October 30, 2023
https://issues.dlang.org/show_bug.cgi?id=24187

--- Comment #7 from mw <mingwu@gmail.com> ---
Created attachment 1897
  --> https://issues.dlang.org/attachment.cgi?id=1897&action=edit
reduced to 2 lines: s2.i

--
October 30, 2023
https://issues.dlang.org/show_bug.cgi?id=24187

--- Comment #8 from Walter Bright <bugzilla@digitalmars.com> ---
The two lines:

extern _Complex _Float32 cacosf32 (_Complex _Float32 __z) __attribute__
((__nothrow__ , __leaf__)); extern _Complex _Float32 __cacosf32 (_Complex
_Float32 __z) __attribute__ ((__nothrow__ , __leaf__));

extern _Complex _Float32x cacosf32x (_Complex _Float32x __z) __attribute__
((__nothrow__ , __leaf__)); extern _Complex _Float32x __cacosf32x (_Complex
_Float32x __z) __attribute__ ((__nothrow__ , __leaf__));

Thanks, this reproduces the problem.

--
October 30, 2023
https://issues.dlang.org/show_bug.cgi?id=24187

--- Comment #9 from Walter Bright <bugzilla@digitalmars.com> ---
It compiles without error if `Float32` is replaced with `float`.

--
« First   ‹ Prev
1 2