Thread overview
[Issue 24303] anonymous struct problems when typedef'd in separate C files
Dec 27, 2023
Walter Bright
Dec 27, 2023
Walter Bright
Dec 27, 2023
Walter Bright
Dec 28, 2023
Dlang Bot
Dec 28, 2023
Dennis
Dec 29, 2023
Dlang Bot
December 27, 2023
https://issues.dlang.org/show_bug.cgi?id=24303

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ImportC

--
December 27, 2023
https://issues.dlang.org/show_bug.cgi?id=24303

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=24280

--
December 27, 2023
https://issues.dlang.org/show_bug.cgi?id=24303

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
This is a victim of the compiler adding the missing tag name for the anonymous struct, but generating a different name for the two definitions. The type of the struct is keyed off of the tag name - so different tag names mean different types.

The solution is to generate the same tag name for each. I have an idea how to do that by making use of the typedef identifier.

--
December 28, 2023
https://issues.dlang.org/show_bug.cgi?id=24303

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

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

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #15958 "fix Issue 24303 - anonymous struct problems when typedef'd in separat…" fixing this issue:

- fix Issue 24303 - anonymous struct problems when typedef'd in separate C files

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

--
December 28, 2023
https://issues.dlang.org/show_bug.cgi?id=24303

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=24306

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

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

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

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #15958 "fix Issue 24303 - anonymous struct problems when typedef'd in separat…" was merged into master:

- 135e3c07b2c2548ecec0ea00478f5e1e2191947c by Walter Bright:
  fix Issue 24303 - anonymous struct problems when typedef'd in separate C
files

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

--