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

          Issue ID: 15505
           Summary: cxtern(C++) array parameter mangling gains surprise
                    const
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

extern(C++) void f(int[4]* t);
Mangles as: void __cdecl f(int (* const)[4])

Where did that const come from?

This would logically be connected to a C++ function declared:
  void f(int(*x)[4]);
Which mangles: void __cdecl f(int (*)[4])

I think it very unlikely that any C++ user would have functions:
  void f(int(*const x)[4]);

Nobody uses *const in C++.

--

Reply via email to