Thread overview
[Issue 23034] importC: head-const struct confused with multiple files on command line
Apr 20, 2022
Walter Bright
Apr 20, 2022
Dlang Bot
Apr 20, 2022
Walter Bright
Apr 20, 2022
Dlang Bot
April 20, 2022
https://issues.dlang.org/show_bug.cgi?id=23034

Walter Bright <bugzilla@digitalmars.com> changed:

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

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
Ah, took me hours to track this one. The trouble is addSTC() to add in a `const`. In D, this works because type names are identifiers, and mangling is skipped for TypeIdentifier. In C, these come through as a TypeTag, which does get mangled, but semantic() hasn't been run, so S1 and S2 both mangle as "x@" and are therefore treated as the same type.

--
April 20, 2022
https://issues.dlang.org/show_bug.cgi?id=23034

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 #14016 "fix Issue 23034 - importC: head-const struct confused with multiple f…" fixing this issue:

- fix Issue 23034 - importC: head-const struct confused with multiple files on command line

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

--
April 20, 2022
https://issues.dlang.org/show_bug.cgi?id=23034

Walter Bright <bugzilla@digitalmars.com> changed:

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

--
April 20, 2022
https://issues.dlang.org/show_bug.cgi?id=23034

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 #14016 "fix Issue 23034 - importC: head-const struct confused with multiple f…" was merged into master:

- 62c0846dd48cef8cf032a552c3e43c18565c42ea by Walter Bright:
  fix Issue 23034 - importC: head-const struct confused with multiple files on
command line

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

--