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

2022-04-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23034

Dlang Bot  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Dlang Bot  ---
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

--


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

2022-04-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23034

Walter Bright  changed:

   What|Removed |Added

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

--


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

2022-04-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23034

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from Dlang Bot  ---
@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

--


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

2022-04-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23034

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #1 from Walter Bright  ---
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.

--