www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16289] New: no extern(C++) mangling for unsigned long


          Issue ID: 16289
           Summary: no extern(C++) mangling for unsigned long
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

The C++ mangler conflates mangling for unsigned, unsigned long, and unsigned
long long depending on the target architecture. Those are separate manglings in
C++, independent of their target size.
This leads to several linking problems w/ C++ code, in particular when a size_t
parameter is involved.
We already have some places in cppmangle where we properly handle
Id.__c_long/Id.__c_ulong. This should be extended to size_t parameters in
extern(C++) functions. We might also consider to change the size_t declaration
to exactly match the C++ definition of the used platform.

Jul 18 2016