[Issue 10058] Inconsistent mangling between C++ and extern(C++).

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 10 09:50:06 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10058



--- Comment #5 from Iain Buclaw <ibuclaw at ubuntu.com> 2013-05-10 09:50:05 PDT ---
With current pull:

test.cc:
void foo1(void* (*)(void*)) {}
void foo2(void* (*)(void*), void* (*)(void*)) {}
void foo3(void* (*)(void*), void* (*)(const void*)) {}
void foo4(void* (*)(void*), void* (*)(const void*), const void* (*)(void*)) {}


test.d:
extern(C++) void foo1(void* function(void*)) {}
extern(C++) void foo2(void* function(void*), void* function(void*)) {}
extern(C++) void foo3(void* function(void*), void* function(const (void)*)) {}
extern(C++) void foo4(void* function(void*), void* function(const (void)*),
const(void)* function(void*)) {}


testcc.o
---
_Z4foo1PFPvS_E
_Z4foo2PFPvS_ES1_
_Z4foo3PFPvS_EPFS_PKvE
_Z4foo4PFPvS_EPFS_PKvEPFS3_S_E


testd.o
---
_Z4foo1PFPvS_E
_Z4foo2PFPvS_ES1_
_Z4foo3PFPvS_EPFS_PKvE
_Z4foo4PFPvS_EPFS_PKvEPFS3_S_E



Looks good so far.  Can anyone think of any other ways to break it?

Regards
Iain

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list