Re: Cpp/D interface semantic

2016-06-26 Thread Guillaume Chatelet via Digitalmars-d
On Sunday, 26 June 2016 at 14:48:00 UTC, Guillaume Chatelet wrote: Johan I saw you created a few bugs for C++ name mangling. Can you assigne the one for Linux to me. I'm redesigning the algorithm and I need as many corner cases as possible. Note: I'm only touching the 'Linux' C++ mangling

Re: Cpp/D interface semantic

2016-06-26 Thread Guillaume Chatelet via Digitalmars-d
On Sunday, 26 June 2016 at 09:28:19 UTC, Johan Engelen wrote: On Sunday, 26 June 2016 at 07:51:16 UTC, Guillaume Chatelet wrote: This is fine in the case where E is a D interface because of reference semantics: it should be passed by pointer. But, in the case where an extern(C++) function

Re: Cpp/D interface semantic

2016-06-26 Thread Johan Engelen via Digitalmars-d
On Sunday, 26 June 2016 at 07:51:16 UTC, Guillaume Chatelet wrote: This is fine in the case where E is a D interface because of reference semantics: it should be passed by pointer. But, in the case where an extern(C++) function calls an extern(C++) type should it be value semantic - as it

Cpp/D interface semantic

2016-06-26 Thread Guillaume Chatelet via Digitalmars-d
This is currently part of the dmd test suite [1]: extern (C++) interface E { int bar(int i, int j, int k); } extern (C++) int callE(E); static assert (callE.mangleof == "_Z5callEP1E"); The last line checks that callE() will pass its argument by pointer. This is fine in the case where