-
-
Notifications
You must be signed in to change notification settings - Fork 655
Fix Issue 10058 - Inconsistent mangling between C++ and extern(C++). #2007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hold fire on this, am investigating a little more... see the bug report. |
Probably should add [DDMD] to this, as I think this might block the ability to have a visitor interface between D and C++ glue, if said visitor interface is defined as extern(C++) |
Add the test cases! |
Should probably produce a bunch of test cases for this to make sure that D follows C++ mangling correctly. |
I'd be happy with just the ones from the bug report for now. Some are available here: https://github.com/mirrors/gcc/tree/master/gcc/testsuite/g++.dg/abi |
Didn't see that you commented before me. :) I'm in London today and without a laptop. Will fix this up either tonight or tomorrow. Most of what I can see in the g++ testsuite are to do with C++ templates... |
Waiting for auto-tester. |
Wait - how come this test passes on win32? |
I don't think the autotester has ran yet? Did not check win32. :) |
I've edited the title so it's easier to know what the pull is about. |
typo in one of the static asserts... serves me right for typing the mangling by hand... :) |
ok, linux testers have started passing... did you say that this won't work for windows? |
... Or OSX... cppmangle.c is not even part of the windows build. On OSX you could check the correct OSX mangling is generated... but on windows it's done in the backend and cannot be checked via mangleof. And of course the mangling is different from linux. |
I figure a |
ok, version(linux) is it then... |
Fix Issue 10058 - Inconsistent mangling between C++ and extern(C++).
This breaks the following code:
(failure was on OSX) |
@WalterBright please, write contents of |
@WalterBright Thanks, please put it in bugzilla with a test case (using .mangleof if possible) |
@yebblies I'm on it. =) |
Fixes http://d.puremagic.com/issues/show_bug.cgi?id=10058
Though maybe the other implementations of ::toCppMangle should be altered to have the same logic as the change here?
Currently it's a half/half situation.