[Trivial] OS X: Make core.stdc.stdint independent of D long C++-mangling#2191
[Trivial] OS X: Make core.stdc.stdint independent of D long C++-mangling#2191dlang-bot merged 1 commit intodlang:masterfrom
long C++-mangling#2191Conversation
|
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2191" |
|
It looks reasonable. Is there a way to know that it's correct? There are no unittests for this kind of stuff it seems. |
|
There are DMD mangling interop tests (or at least will be); I'm about to create a DMD PR reverting to the previous mangling for |
|
I have a mac, is there something I can compile to ensure this is correct? |
|
For testing, you could compile import core.stdc.stdint;
extern(C++) void fooCpp(int64_t, uint64_t);
void main() { foo(123, 456); }(with DMD master) and check the function mangle. It should be |
|
I'm confused -- I wrote the following C++ file: #include <stdint.h>
void fooCpp(int64_t, uint64_t)
{
}And it mangles as If I write your code (changing foo to fooCpp of course), it links fine against the C++ object on the 2.080 compiler (without your changes). I don't know what the plan is here, but it seems like we shouldn't be ultimately changing the mangling at all, no? |
|
So it's working (and this stuff is in LDC 1.10). ;) - This tiny PR here doesn't change the mangling, it just prepares for a D |
|
Sorry, wish I could have helped better, but my understanding of the OSX mangling issues is not good... |
C++
int64_tis defined aslong longon both 32/64-bit OS X, so use the appropriate alias defined incore.stdc.config.