Bug 20974 – extern(C++, "foo", "bar") template mangling ignores "foo".

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-06-24T21:22:13Z
Last change time
2024-12-13T19:09:42Z
Assigned to
No Owner
Creator
Richard Manthorpe
Moved to GitHub: dmd#19734 →

Comments

Comment #0 by rmanth — 2020-06-24T21:22:13Z
alias B = A!(); extern(C++, "foo", "bar") struct A() { double f(); } pragma(msg, A!().f.mangleof); On linux it should print _ZN3foo3bar1A1fEv but prints _ZN3bar1A1fEv On windows it should print ?f@?$A@@bar@foo@@QEAANXZ but prints ?f@?$A@@bar@@QEAANXZ This basically ignores the "foo" part of the namespace. If you change or remove the "foo" you get the same result. If you remove the `alias B = A!()` or move that after the declaration of `A` it gets the correct mangle. If you change it to `extern(C++, foo.bar)` it gets the correct mangle.
Comment #1 by robert.schadek — 2024-12-13T19:09:42Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19734 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB