Jump to page: 1 2
Thread overview
[Issue 22322] ImportC: struct with floating point members gives bizarre error.
Sep 19, 2021
mhh
Sep 19, 2021
mhh
Sep 19, 2021
mhh
Sep 20, 2021
Walter Bright
Sep 21, 2021
Walter Bright
[Issue 22322] ImportC: struct with floating point members causes problems with generated toHash() function
Sep 21, 2021
Walter Bright
Sep 21, 2021
Dlang Bot
Sep 24, 2021
Dlang Bot
Sep 30, 2021
Dlang Bot
September 19, 2021
https://issues.dlang.org/show_bug.cgi?id=22322

dave287091@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ImportC, rejects-valid

--
September 19, 2021
https://issues.dlang.org/show_bug.cgi?id=22322

mhh <maxhaton@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxhaton@gmail.com

--- Comment #1 from mhh <maxhaton@gmail.com> ---
Could you try with -betterC and see if the error message remains?

--
September 19, 2021
https://issues.dlang.org/show_bug.cgi?id=22322

--- Comment #2 from dave287091@gmail.com ---
(In reply to mhh from comment #1)
> Could you try with -betterC and see if the error message remains?

The error goes away with -betterC.

--
September 19, 2021
https://issues.dlang.org/show_bug.cgi?id=22322

--- Comment #3 from mhh <maxhaton@gmail.com> ---
Ok, if this is with dmd master it's because recently it was made impossible to
use .tupleof inside C code (long story...), however this seems to have disabled
 use of .tupleof when the C struct is being consumed inside D code as well.

-betterC gets rid of the error which suggests to me that it's something to do with TypeInfo.

--
September 19, 2021
https://issues.dlang.org/show_bug.cgi?id=22322

--- Comment #4 from dave287091@gmail.com ---
(In reply to mhh from comment #3)
> Ok, if this is with dmd master it's because recently it was made impossible to use .tupleof inside C code (long story...), however this seems to have disabled  use of .tupleof when the C struct is being consumed inside D code as well.
> 
> -betterC gets rid of the error which suggests to me that it's something to do with TypeInfo.

It’s on the latest stable branch, commit 714c34ef8629c23751d7071d7dcc1d697708ad13

I just tried with master branch, commit
576ab617f5e84b8782752c1ebf5f5fd4beb1dac0
and the error is not there.

--
September 19, 2021
https://issues.dlang.org/show_bug.cgi?id=22322

--- Comment #5 from mhh <maxhaton@gmail.com> ---
https://github.com/dlang/dmd/pull/13066 targeted stable

--
September 20, 2021
https://issues.dlang.org/show_bug.cgi?id=22322

Walter Bright <bugzilla@digitalmars.com> changed:

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

--- Comment #6 from Walter Bright <bugzilla@digitalmars.com> ---
It sounds like it's trying to build the default struct member functions for it.

--
September 21, 2021
https://issues.dlang.org/show_bug.cgi?id=22322

--- Comment #7 from Walter Bright <bugzilla@digitalmars.com> ---
The problem is in the buildXtoHash() function in clone.d. It adds .tupleof properties, whereas C files don't have such properties.

--
September 21, 2021
https://issues.dlang.org/show_bug.cgi?id=22322

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ImportC: struct with        |ImportC: struct with
                   |floating point members      |floating point members
                   |gives bizarre error.        |causes problems with
                   |                            |generated toHash() function

--
September 21, 2021
https://issues.dlang.org/show_bug.cgi?id=22322

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

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

--- Comment #8 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #13091 "fix Issue 22322 - ImportC: struct with floating point members causes …" fixing this issue:

- fix Issue 22322 - ImportC: struct with floating point members causes problems with generated toHash() function

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

--
« First   ‹ Prev
1 2