-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
fix Issue 23387 - ImportC: identical structs defined in two C files l… #14541
Conversation
f97dcf5 to
02fc06c
Compare
|
Why is dmd even generating this symbol for C sources? The initializer is all zeros, no need to store that as a run-time symbol. |
|
ping @WalterBright |
02fc06c to
83a9be4
Compare
|
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#14541" |
…ead to duplicate .init symbol on macOS
83a9be4 to
7fe0aee
Compare
|
I don't know what the test runner is asking for: |
|
@dkorpel do you know what is going on with the test runner? |
|
The C symbols shouldn't be separate anyway either. This is another case where the root fix (sticking to C semantics in importC; putting everything into one merged C namespace and collapsing compatible declarations) would solve several bugs at once, but by adding more and more special cases for individual issues, the tech debt grows instead of shrinks as issues are closed. |
|
@adamdruppe I understand what you mean, but do not believe it is necessary. |
No, but I can take a closer look tomorrow |
|
The test runner doesn't replace the separately compiled ".i" extension to ".o", it only replaces ".d". I added a commit that should fix it. |
…ead to duplicate .init symbol on macOS
Note that the test should should compile them separately:
But I don't see a way to do that with the test runner.