[Issue 20223] New: C++, POSIX: Wrong mangling for const reference of callback

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 18 01:38:18 UTC 2019


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

          Issue ID: 20223
           Summary: C++, POSIX: Wrong mangling for const reference of
                    callback
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: pro.mathias.lang at gmail.com

```
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`.

--


More information about the Digitalmars-d-bugs mailing list