Bug 20223 – C++, POSIX: Wrong mangling for const reference of callback

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2019-09-18T01:38:18Z
Last change time
2019-09-23T09:53:47Z
Keywords
pull
Assigned to
No Owner
Creator
Mathias LANG

Comments

Comment #0 by pro.mathias.lang — 2019-09-18T01:38:18Z
``` extern(C++) public int foo(T)(int function(const(T)* value)); extern(C++) public int bar(T)(int function(ref const(T) value)); ``` The first one gets mangled as `_Z3fooIiEiPFiPKT_E`, as it should. The second one gets mangled as: `_Z3barIiEiPFiRT_E` instead of `_Z3barIiEiPFiRKT_E`.
Comment #1 by dlang-bot — 2019-09-18T02:21:54Z
@Geod24 created dlang/dmd pull request #10417 "Fix issue 20223: Wrong mangling for const reference of callback" fixing this issue: - Fix issue 20223: Wrong mangling for const reference of callback https://github.com/dlang/dmd/pull/10417
Comment #2 by dlang-bot — 2019-09-23T09:53:47Z
dlang/dmd pull request #10417 "Fix issue 20223 + 20224: Wrong mangling for const reference of callback" was merged into stable: - c23c2cecb08cb44b00577be28fde91b09e7c07bd by Geod24: Fix issue 20223, 20224: Wrong mangling for const reference In addition to the wrong mangling, the substitution pool needed to be adjusted. https://github.com/dlang/dmd/pull/10417