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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 20 04:40:09 UTC 2022


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

Walter Bright <bugzilla at digitalmars.com> changed:

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

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

--


More information about the Digitalmars-d-bugs mailing list