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

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ImportC
            Summary|dmd ImportC:                |ImportC: _Float32 not
                   |cmathcalls.h(55): Error:    |defined
                   |illegal type combination    |

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

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #10 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #15751 "fix Issue 24187 - ImportC: _Float32 not defined" fixing this issue:

- fix Issue 24187 - ImportC: _Float32 not defined

https://github.com/dlang/dmd/pull/15751

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

--- Comment #11 from mw <mingwu@gmail.com> ---
Thanks for the quick fix. C has So many defines ...

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

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #12 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #15751 "fix Issue 24187 - ImportC: _Float32 not defined" was merged into master:

- e0a033dfae29c6ad6f54af804d845e5793630658 by Walter Bright:
  fix Issue 24187 - ImportC: _Float32 not defined

https://github.com/dlang/dmd/pull/15751

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

mw <mingwu@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #13 from mw <mingwu@gmail.com> ---
Is this issue really fixed?

I just tried the latest dmd which suppose to have the fix, but it still cannot compile s2.i and s7.i:

$ dmd --version
DMD64 D Compiler v2.106.0-beta.1


$ $ 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


$ dmd s7.i
/usr/include/x86_64-linux-gnu/bits/cmathcalls.h(55): Error: illegal type
combination
/usr/include/x86_64-linux-gnu/bits/cmathcalls.h(55): Error: missing comma or
semicolon after declaration of `_Float32`, found `cacosf32` instead
/usr/include/x86_64-linux-gnu/bits/cmathcalls.h(55): Error: illegal type
combination
/usr/include/x86_64-linux-gnu/bits/cmathcalls.h(55): Error: missing comma or
semicolon after declaration of `_Float32`, found `__cacosf32` instead
/usr/include/x86_64-linux-gnu/bits/cmathcalls.h(57): Error: illegal type
combination
...

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

--- Comment #14 from Walter Bright <bugzilla@digitalmars.com> ---
It's fixed in the reduced sample you provided. Can you try that with the compiler?

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

--- Comment #15 from mw <mingwu@gmail.com> ---
I tried already, you can see from my previous post.

$ dmd --version
DMD64 D Compiler v2.106.0-beta.1

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

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #16 from Walter Bright <bugzilla@digitalmars.com> ---
Rename s2.i to s2.c and it will compile.

The reason is that .c files are first sent through the C preprocessor, which automatically #include's importc.h, which contains the macro for _Float32.

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

--- Comment #17 from mw <mingwu@gmail.com> ---
Thanks, it worked.

Now if we can get this issue fixed, then we can compile s7.c

https://issues.dlang.org/show_bug.cgi?id=24228

--
1 2
Next ›   Last »